mojibake

Detecting Characters in an XSLT

I have encountered some odd characters that do not display properly in Internet Explorer, such as these: “, –, and ’. I think they're carried over from copy-and-paste Word content. I am using XSLT to build the page content and it would be great to detect these characters in the XSLT and replace them with valid HTML codes. I alread...

Unexpected output of std::wcout << L"élève"; in Windows Shell

While testing some functions to convert strings between wchar_t and utf8 I met the following weird result with Visual C++ express 2008 std::wcout << L"élève" << std::endl; prints out "ÚlÞve:" which is obviously not what is expected. This is obviously a bug. How can that be ? How am I suppose to deal with such "feature" ? ...

Why are these strange characters appearing in mcrypt?

I Encrypt and Decrypt successfully, but when I decrypt the value, appears strange characters at the final of string "���": The initial $_POST['value'] do not have any blank space or any strange character Any idea to solve this? Encrypt with this: $key='my key'; $td = mcrypt_module_open('tripledes', '', 'ecb', ''); $iv = mcrypt_create_...

PHP Strange character before £ sign?

For some reason i get a £76756687 weird character when i type a £ into a text field on my form? ...

Getting ’ instead of an apostrophe(') in PHP

I'v tried converting the text to or from utf8… didn't seem to help Im getting: "It’s Getting the Best of Me" It should be: "It’s Getting the Best of Me" Im getting this data from a url -> http://www.tvrage.com/quickinfo.php?show=Surviver&amp;ep=20x02&amp;exact=0 ...

Windows to Linux utf-8 file

I have a file UTF-8 encoding in windows, and when i use it under windows it shows everithing right, but when i copy the file in Linux, the Unicode characters are giberish. The file is plain textfile. How can i get this file to be readable in linux, or how can i copy it properly?? thanks in advance ...

"’" showing in page in place of this " ' "...

’ showing in page in place of this ' what is the problem? how to solve This is already defined in <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> Update: Browser is already set on Unicode And content type is already set too ...

Why can I not view foreign language characters in my mysql DB?

I am inserting the following characters into my DB: 汉字 / 漢字 This is the meta tag on the page that is inserting the characters: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> I have altered all the columns in my table that is holding the characters to be utf8_unicode_ci The foreign characters show up like so in...

Site doesn't show up. Instead a bunch of weird characters?

‹�����혱jÃ0†w=Å=AÜ ÂЃ)ÅKGÅ:¢En%¹©ß¾²Ý 7xèpußøãŸ~ÝöÇ®Ömót¨•îŸû®©îao‚½‘Í:ºR†æk@´huõÃ(]­;z:¼•Íö¾þ{¥•‚¾ímwi£_±Ä1)–ÄÇ�‡‘,‰%Ž#YKF²Ä²Ä8ŒèKF²$–88ŒdI,qpÉ’Xâà0’%±Ä1Àaþe–TïÆOŒ@ 2^ßÇh"ù¦`Î!뜄yœ"Dü˜0e°Ó:ËË>e„ñʈfp.à(U®<œv¿ì;xñhRY3˜‹¡�ÞdŒ;Uºõ×R°WkÑ^Z÷¥¯Wß.Ò¤·�� That's exactly what shows up instead of my website in the web browser. Though on local...

mysql - funny square characters added to the value when inserting it into table

Hi, I have a php script that inserts values into mySQL table INSERT INTO stories (title) VALUES('$_REQUEST[title]); I checked the values of my request variables before going into the table and it's fine. But when I add title=john to the table for example, I get something like this: title = "[][][][]john" and when I extract the valu...

Pound symbol not displaying on web page

Hello I have a mysql database table to store country name and currency symbol - the CHARSET has correctly set to UTF8. This is example data inserted into the table insert into country ( country_name, currency_name, currency_code, currency_symbol) values ('UK','Pounds','GBP','£'); When I look in the database - the pound symbol appea...

Why does HTML::TreeBuilder show mojibake/weird characters in the output?

I am having a problem with HTML::TreeBuilder; it shows mojibake/weird characters in the output. Please help me. Thanks in advance. use strict; use WWW::Curl::Easy; use HTML::TreeBuilder; my $cookie_file ='/tmp/pcook'; my $curl = new WWW::Curl::Easy; my $response_body; my $charset = 'utf-8'; $DocOffline::charset = undef; $curl->setopt (C...

How to prevent non-ascii characters from being saved in Drupal database?

I've noticed that in Drupal after some users enter content into the body of a node, characters like quotes and apostrophes get saved as: ’ “ This is due the user entering odd characters or something... Does this mean the Drupal database hasn't been configured for utf8? How can this be corrected so ’ is actually saved as just '? ...

Character Encoding Mismatch

My scripts are definitely saved in UTF-8. I'm instantiating PDO with "{$this->engine}:host={$this->host};dbname={$this->name};charset=UTF-8". My tables use InnoDB and are collated using utf8_general_ci. My pages are sent either with the Content-Type: text/html; charset=UTF-8 header or the <meta> equivalent. When using PDO to store a € c...

How do I transform "ТеÑ" (it is russian word) into something readable?

Hello, I got MySQL DB which contains UTF8 column with such "ТеÑ" records. PHP's mb_detect_encoding() told me that this is UTF-8. How can I transform this "horror" into something readable? Thank you ...

problem with utf-8 windows versus Mac

OK, I have a small test file that contains utf-8 codes. Here it is (the language is Wolof) Fˆndeen d‘kk la bu ay wolof aki seereer a fa nekk. DigantŽem ak Cees jur—om-benni kilomeetar la. MbŽyum gerte ‘pp ci diiwaan bi mu that is what it looks like in a vanilla editor, but in hex it is: xxd test.txt 0000000: 46cb 866e 6465 656e 2064 ...

Fixing encondings

I have ended up with messed up character encodings in one of our mysql columns. Typically I have √© instead of é √∂ instead of ö √≠ instead of í and so on... Fairly certain that someone here would know what happened and how to fix. UPDATE: Based on bobince's answer and since I had this data in a file I did the following #!/use...

Where can I find an UTF8 bits to char table to convert for instance "ñ" into "ñ"?

Hello.. I have been looking thoroughly through the Web and I cannot seem to find a table with those kind of conversions. The ones I find have some mistakes and are not too reliable, so I have looked for some official table or alike, but unfortunately I haven't.. so here I am.. As mentioned in the title, what I want to do is for instance...