Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I've got an Excel file with text in Hindi which I'm trying to read via PHP but I only get gibberish out of it.
When I open the .xls File with Numbers, the text looks like this:
But when I copy and paste this exact text here it looks like this:
ß[+kq'kh ge ij fuHkZj djrh gSAÞ
When I read it via PHP I get exactly the same gibberish text.
Is this an encoding problem in the .xls file and is it somehow possible to extract a UTF-8 encoded version from it?
Jaswinder Singh's comment fixed the Issue!
The text is written in a font called "Kruti Dev 010" which is just normal text but displayed as hindi letters.
By using this tool I could recover the texts to unicode.
Thanks Jaswinder!
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
I want to save chemistry equations in my database, equations for example:
`AB + O2 → Oxide of A & B`
Even typing here 2 is coming beside O whereas it's the symbol of oxygen like below:
Please note: If I am trying to directly copy and paste it in MySQL table field using phpMyAdmin, there also O2 is not getting saved as a symbol.
Note: MySQL field is text , collation is utf8mb4_general_ci.
Saving from php to mysql is next step. For now at least simply copying it (from phpMyAdmin) should work in MySQL.
I noticed that the subscript numbers on the web pages aren't actually subscripts, its just the HTML tag making it. (the <sub> tag).
So you have to use some kind of converter for it or do it yourself to convert it to actual unicode subscript.
If you want to print the equations to web page from database, you can save it with the HTML tag e.g.
H<sub>2</sub>O
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I have a CSV file. If I open it with a standard text editor such as notepad or excel, I can read the strings. But I can't read it with my PHP code (there is a symbols font error). How can I fix it?
My PHP code:
<?php
$file = fopen("data.csv","r");
while(! feof($file))
{
print_r(fgetcsv($file));
}
fclose($file);
?>
My CSV file
Thank all! I found the answer http://www.practicalweb.co.uk/blog/2008/05/18/reading-a-unicode-excel-file-in-php/
The file encoding appears to be UCS-2 LE, from which UTF-16 developed1. (also see this answer).
Save the file with UTF-8 encoding. Instead of notepad, try using a different text editor like Notepad++. It has a menu for choosing the encoding of the file. Then the PHP code can read the characters as desired. See demo here.
1https://web.archive.org/web/20060114213239/http://www.unicode.org/faq/basic_q.html#23
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I use a TextView to user type a comment, I store it on data base and show on a tableview or label to user. But when the user type a emoji on middle of string, the emojis is stored like a hexa, how to convert this emojis again when I add on label or tableview?
Or I dont need to change anything on my swift code and I need to change my database to store emojis? Or my API PHP?
Your connection to MySQL must specify utf8mb4.
Your column/table must be `CHARACTER SET utf8mb4.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I have an app that stores survey responses. Some of the responses are plain-text responses with feedback.
When the person filling the survey out adds a line (his return on the key board) this creates a new paragraph.
It is stored in my Postgres database as an ascii character chr(10) (referring to it in Postgres terms).
This is all fine however the problem I am running into is when I display the values. My PDF printing app doesn't understand this ascii encoding and displays it all as one line. Instead of:
One line
Two lines
Three lines
It returns it as:
One line Two lines three lines
Makes for very long drawn out paragraphs...
I am trying to figure out how I can replace the ascii code with an html break <br/>.
I am obviously familiar with str_replace - the point is that I am not familiar with ascii at all and need some help on how to search for this in the string to replace with an HTML break <br/>.
Thank you.
To replace line breaks with <br />, you can use the built-in PHP function nl2br
e.g.
$content = nl2br($content);
(technically it inserts the BRs before the line breaks, so they're still there, but should work ok)
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I build my web sit by wordpress. When i try to add feed function some issue occur.I use chrome visit the feed,log is :
This page contains the following errors:
error on line 134 at column 16: Input is not proper UTF-8, indicate encoding !
Bytes: 0x08 0xE8 0xBF 0x90
Below is a rendering of the page up to the first error.
I have checked the the blank of header.php.I also use fix rss plug-in, but it still can't be fix it. How do I check which file cause the error? my feed url is : http://www.songyang.net/feed/
It looks like the page here has invalid UTF-8 characters in it. The problem lies here:
首先,我们需要创建一个场景。接着在场景中放放置一个灯光, 最后在场景中放置一个物体, 将它上面挂载一个我们创建的组件。
**bad character here**运行程序后, 场景中会出现一个 UI 按钮, 点击它移动立方体。移动的路径通过两个动画拼接完成。
Delete the characters around there and re-type them, that should remove the invalid character.
It tells you where the bad character is because it renders the page up until the character. If you want, you can actually see the character by copy/pasting the section of text into a UTF-8 file in Notepad++. In this case, it comes out as a "BS" character!
bad character.