Menu
  • HOME
  • TAGS

How can I convert strings like \xd0\x9d to a proper text

string,actionscript-3,utf-8,utf8-decode,flash-cc

Use double quotes instead of single quotes. This code: <?php header("Content-Type: text/html; charset=UTF-8"); header("Content-Language: ru"); print("\xd0\x9d\xd0\xb0\xd1\x88\xd0\xb5"); ?> Returns this: Наше ...

tomcat double decode url

tomcat,urldecode,utf8-decode

i had problem after checking it in my wireshark , i have a problem in another place in the system ,i solve my problem.

Base64-decode a string using NetEncoding in Delphi XE7?

delphi,base64,decode,delphi-xe7,utf8-decode

You are calling the Decode overload that accepts base64 encoded text and returns a string. The way that Decode method is implemented is as follows: Decode the base64 to binary. Treat the binary as UTF-8 encoded text. Decode the UTF-8 bytes to text. Your error message indicates that the binary...

call url from java with special characters

java,url,character-encoding,utf8-decode

You didn't define what sFromLang is, but check if this works for you: public static void main(String[] args) throws IOException { String sFromLang="<add the value here>"; String sWikiID="Iași"; String sArticleEncoded = URLEncoder.encode(sWikiID, "UTF-8"); String sURL = "http://" + sFromLang + ".wikipedia.org" + "/w/api.php?action=query&prop=langlinks&titles=" + sArticleEncoded + "&redirects=&lllimit=400"; URL url =...

Chinese characters stored in MYSQLis not displayed in CI

php,mysql,codeigniter,utf-8,utf8-decode

I had included mb_internal_encoding('UTF-8'); header('Content-type: text/html; charset=UTF-8') ; in the header It works fine now. Thanks guys for your comments....

Read utf-8 character from byte stream

python-3.x,utf-8,utf8-decode

Wrap the stream in a TextIOWrapper with encoding='utf8', then call .read(1) on it. This is assuming you started with a BufferedIOBase or something duck-type compatible with it (i.e. has a read() method). If you have a generator or iterator, you may need to adapt the interface. Example: from io import...

UTF 8 encoding not working properly in PHP

php,html,mysql,utf8-decode

The character set needs to be defined in a few different places: The MySQL database The text stored in the database might not be encoded as UTF-8. You can define a default character set as part of the create database statement: CREATE DATABASE mydb CHARACTER SET utf8; You can also...

What -C flag number in perl makes UTF-8 “just work”?

perl,utf-8,utf8-decode

Why there is no -C flag number ... which makes the example work at least once? Because using UTF-8 literals in your Perl source requires use utf8;. for (( i=0; $i < 512; i=$((i+1)) )); do echo -n 'привет мир' | perl -C$i -le 'use utf8; $a=<>; print sprintf("%...

How to decode String?

java,jsp,url,utf8-decode

Specify the encoding when you create he reader: new InputStreamReader(conn.getInputStream(), "UTF-8")); Don't try to do any other conversions....

Java convert Windows-1252 to UTF-8, some letters are wrong

java,utf-8,utf8-decode,windows-1252

I solved it thanks to all. I have the next project structure: MyBatisQueries: I have a query with a "select" which gives me the String Pojo to save the String (which gave me the String with conversion problems) The class which uses the query and the Pojo object with data...

encoding / decoding special characters in python 2.7

linux,python-2.7,raspberry-pi,latin1,utf8-decode

>>> print '3631B043'.decode('hex').decode('iso-8859-1') 61°C The first decode decodes the hex to bytes. The second decode converts from bytes using Latin-1 (aka ISO-8859-1) to Unicode. At this point, you have a proper Unicode string, which can be further encoded into different encodings if you desire....

UTF8 Byte to String & Winsock GetStream

c#,utf-8,winsock,utf8-decode

It's perfectly normal for UTF-8 encoded text to be more bytes than the number of characters. In UTF-8 some characters (for example á and ã) are encoded into two or more bytes. As the ReadFully method returns garbage if you try to use it to read more than fits in...

How to replace UTF-8 characters with similar-looking ASCII characters with PHP?

php,utf8-decode

Use iconv with the //TRANSLIT modifier: $str1 = "Xin chào tất cả các bạn. Mình không biết tiếng anh."; $str2 = iconv("UTF-8", "ASCII//TRANSLIT", $str1); print($str1.PHP_EOL.$str2); The output will be: Xin chào tất cả các bạn. Mình không biết tiếng anh. Xin chao tat ca cac ban. Minh khong biet tieng...