Help with gibberish (encoding issue...only at first time) !!!

999 views
Skip to first unread message

RoyZ

unread,
May 15, 2011, 4:51:17 PM5/15/11
to Chromium-extensions
Hi All,

I have an app which displays some of the content in Hebrew. The
problem is that when I first open the app (it's a browser app) it
displays Gibberish (as if the wrong encoding) and only at the second
time it displays it well.

The problem is of course that not all users installing the app are
aware of this and might uninstall after first try...

Any help would be highly appreciated.

Thanks,
Roy
Message has been deleted

PhistucK

unread,
May 16, 2011, 2:07:29 AM5/16/11
to RoyZ, Chromium-extensions
Are you using UTF8?
Are you using Windows-1255?
Are you using both of them?

Is the content dynamically loaded (using AJAX? using iFrames?)?
If so, does it have the correct encoding identifier within its HTTP headers (for AJAX) or within the page through <meta> (for iFrames)?

Do you declare the (correct) encoding identifier on the containing page using <meta>?

PhistucK




--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


roy zinn

unread,
May 16, 2011, 3:45:10 AM5/16/11
to PhistucK, Chromium-extensions
Hi PhistucK,

Thanks for your reply.
Actually, I'm quite new to all this stuff (new to HTML, JavaScript etc...) and I'm learning "on the fly".
So, I don't have any <meta> tag and didn't declare UTF8 or any other encoding anywhere...
The data is loaded using AJAX, but actually, the loaded data is shown ok. 
What is not shown ok (and again, only when the app is opened for the first time, after that it is magically fine) is this line:
$('.divcontainer #timeline').html('<li class="loading"> ...טוען נתונים <img src="images/loader.gif" /></li>'); where the html content in Hebrew is broken.

Can you please let me know how what should the <meta> look like?

Thanks in advance,
Roy

PhistucK

unread,
May 16, 2011, 3:53:56 AM5/16/11
to roy zinn, Chromium-extensions
For Chrome (or any other modern browser that supports HTML5) -
<meta charset="utf-8"/>

Make sure that all of your files (HTML, JavaScript, CSS) are actually encoded in UTF-8, this will make sure this kind of stuff does not happen.

Also, make use of HTML5, start your HTML file with (before any code, right at the beginning) -
<!DOCTYPE HTML>

PhistucK

roy zinn

unread,
May 16, 2011, 4:06:14 AM5/16/11
to PhistucK, Chromium-extensions
Hi Again,

Thanks for the quick response!

Just to be on the safe side:
<meta charset="utf-8"/> - should be at the <head> tag, correct?

"Make sure that all of your files (HTML, JavaScript, CSS) are actually encoded in UTF-8, this will make sure this kind of stuff does not happen." - Sorry for the pretty dumb question, but how do I make sure they are encoded in UTF-8 (is it by including the above meta in all files)?

Thanks again,
Roy

PhistucK

unread,
May 16, 2011, 4:12:14 AM5/16/11
to roy zinn, Chromium-extensions
See my comments inline.

PhistucK



On Mon, May 16, 2011 at 11:06, roy zinn <roy....@gmail.com> wrote:
Hi Again,

Thanks for the quick response!

Just to be on the safe side:
<meta charset="utf-8"/> - should be at the <head> tag, correct?


That is correct.

"Make sure that all of your files (HTML, JavaScript, CSS) are actually encoded in UTF-8, this will make sure this kind of stuff does not happen." - Sorry for the pretty dumb question, but how do I make sure they are encoded in UTF-8 (is it by including the above meta in all files)?


If you are using Notepad, you can go to File-->Save as... and choose "UTF-8" in the selection box next to "Encoding:".
Other applications have their way of saving text files as UTF-8. Consult their help contents.
Reply all
Reply to author
Forward
0 new messages