charset

Unicode Encoding and decoding issues in QRCode

I am trying to generate UTF-8 QRCode so that I can encore accents and Unicode characters. To test it, I am using many decoding solution : http://zxing.org/w/decode.jspx - The zxing project also used in Android http://www.drhu.org/QRCode/QRDecoder.php - a PHP Decoder http://zbar.sf.net - The ZBar bar code reader - OpenSource and C proj...

Charset problem, MySQL and get_meta_tags()

Hello, I'm trying to get HTML meta tags with PHP by using get_meta_tags() function. I'm using UTF8 for tables, charset/collations, as connection charset to MySQL and everything else. But unfortunetely MySQL cuts off the string when inserting to table. It happens while HTML encodings are different than UTF-8 (for example ISO 8859-1) Is...

Guessing the encoding of text represented as byte[] in Java

Given an array of bytes representing text in some unknown encoding (usually UTF-8 or ISO-8859-1, but not necessarily so), what is the best way to obtain a guess for the most likely encoding used (in Java)? Worth noting: No additional meta-data is available. The byte array is literally the only available input. The detection algorithm ...

Java: Why charset names are not constants?

Charset issues are confusing and complicated by themselves, but on top of that you have to remember exact names of your charsets. Is it "utf8"? Or "utf-8"? Or maybe "UTF-8"? When searching internet for code samples you will see all of the above. Why not just make them named constants and use Charset.UTF8? ...

meta keywords characterset

On my site sinj.com.hr I have croatian diacritic letters which I encode to utf-8 html entities. For example, Obiteljski liječnici, na području koje pokriva sinjska ispostava Nastavnog zavoda za javno zdravstvo, danas su počeli s cijepljenjem protiv sezonske gripe. Dodajmo kako cjepivo protiv sezonske gripe nije otporno na v...

Charset and UTF-8 in a downloaded text file on a Mac

We have a PHP/MYSQL application that collects user input, including special characters like ø,ü,ñ, etc Database is capturing them, and they can be seen via PHPmyAdmin. Download on windows is fine. Display on a mac browser is fine. When users download the text file on a Mac OSX, the unicode characters come out as other characters. If ...

ado.net entity data model and mysql - problem with UTF8

I use ADO.NET Entity Data Model in ASP.NET with MySql. I tried many collocation for my databases and tables but so far diacritics (polish) characters are changed.. for example, from ł to l. And this is at query level (I log all query to file on mysql server level). Any ideas? My connection string does not contain any infromation about ch...

Oracle Database Character Set

Hello how do I change or alter the character set of a database for it to support nihongo characters ...

Java String Encoding to UTF-8

Hi All, I have some HTML code that I store in a Java.lang.String variable. I write that variable to a file and set the encoding to UTF-8 when writing the contents of the string variable to the file on the filesystem. I open up that file and everything looks great e.g. shows up as a right arrow. However, if the same String (containing ...

How to Find Default Charset/Encoding in Java?

The obvious answer is to use Charset.defaultCharset() but we recently found out that this might not be the right answer. I was told that the result is different from real default charset used by java.io classes in several occasions. Looks like Java keeps 2 sets of default charset. Does anyone have any insights on this issue? We were abl...

Message charset

How do I get the charset from javax.mail.Message object? ...

How to convert non-supported character to html entity in Java

Some character not support by certain charset, so below test fail. I would like to use html entity to encode ONLY those not supported character. How, in java? public void testWriter() throws IOException{ String c = "\u00A9"; String encoding = "gb2312"; ByteArrayOutputStream outStream = new ByteArrayOutputStream(); Writer...

Generate all combinations of a char array inside of a CUDA __device__ kernel

Hi, I need help please. I started to program a common brute forcer / password guesser with CUDA (2.3 / 3.0beta). I tried different ways to generate all possible plain text "candidates" of a defined ASCII char set. In this sample code I want to generate all 74^4 possible combinations (and just output the result back to host/stdout). $...

sql server output charset

Is there any way to get SQL Server result in charset different from the native database encoding? I mean something like "set names" which is used by MySQL. ...

Upsidedown question marks question

We have a very strange problem in out application, all of a sudden we started noticing upside down question marks being saved along with other text typed in to the fields on the screen. These upside down question marks were not originally entered by the users and it is unclear where they come from. We are using Oracle 10g with Asp.Net. ...

how to replace special characters with the ones they're based on in PHP?

How do I replace: "ã" with "a" "é" with "e" in PHP? Is this possible? I've read somewhere I could do some math with the ascii value of the base character and the ascii value of the accent, but I can't find any references now. thanks ...

accent ajax encoding issue

Source file has: header('Content-type: text/html; charset=iso8859-1'); Source ajax (jQuery) script is: $(document).ready(function() { $.ajaxSetup({ cache: false }); $("#searchfield").keyup(function(){ $("#insert_search") .load('ajax/searchobjects.php', {search_word: $("#searchfield").val()}, function(){ }); }); }); ...

Win32 development - String related datatypes in C++

Hi, I was going to start with Win32 app development. Before I could get the first window to display i was ready to give up! I was overwhelmed by the number of datatypes you need to know about before you can write a simple WinMain and WndProc. (unless you copy-paste of course!) Especially these - LPSTR LPCSTR LPWSTR LPCWSTR Can so...

PHP - problem with urls and charsets

When my URL contains a get with "בלה בלה" , the url stays in hebrew and when I do echo $_GET['hebrew'], it outputs it in hebrew, great. However, when it contains "São Paulo", it starts going nuts, the URL changes to "S%E3o%20Paulo" and the output is "S�o Paulo". This gets me extremely frustrated, can anyone of you guys help me with this...

UTF-8 Encoding in java, retrieving data from website

I'm trying to get data from website which is encoded in UTF-8 and insert them into the database (MYSQL). Database is also encoded in UTF-8. This is the method I use to download data from specific site. public String download(String url) throws java.io.IOException { java.io.InputStream s = null; java.io.InputStreamRe...