character-encoding

Convert unicode to ISO 8859-2 in .net

Hello, Im messing a lot with encoding stuff. I see UTF-8, Unicode, Latin, ISO, RTC, etc... But i dont understand the relation between them. How could i convert from Unicode to ISO 8859-2? Thanks in advance. Regards. ...

Cyrillic , AJAX and database

Database - MySQL. I save form data in the database with native AJAX. In file 1 (where is the form and AJAX) I have <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> and mysql_query("SET CHARACTER SET utf8"); In file 2 (database submission) I have mysql_query("SET CHARACTER SET utf8"); iconv_set_encoding("inter...

What encoding type of these text?

When I search in Google by Thai language. Google will convert like these. %E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2%E0%B9%84%E0%B8%97%E0%B8%A2 ...

How to set the charset with JAX-RS?

How can I set the charset with JAX-RS? I've tried @Produces("text/html; charset=UTF-8") but that was ignored and only text/html was send with the HTTP header. I want to set the charset within a MessageBodyWriter, but don't want to extract the media type by analysing the @Produces annotation via reflection by myself. ...

The browser shows me "???" instead of UTF-8 characters

The browser shows me "???" instead of UTF-8 characters. What is the cause and how can I fix it? Here is the HTML file: <HTML> <title>Search Engine</title> <form action='search.php' method='GET'> <font face='sans-serif' size='5'> <center> My Search Engine.<br> <input ...

FreeMarker encoding confusion

When I read an UTF-8 encoded template with FreeMarker, special chars are rendered correctly in the browser, although freeMarkerConfig.getDefaultEncoding() returns "Cp1252". If I set freeMarkerConfig.setDefaultEncoding("UTF-8"), I see only question marks in the browser, although "UTF-8" is the actual encoding of the template file. In ever...

What should I do to save all kind of user input characters in MySQL database?

I am creating a web base application using PHP and MySQL. I want it to be able to save any kind of user input characters, both English and non-English characters like Arabic or Japanese at the same time. What should I do to achieve that? ...

Java: multithreaded character stream decoding

I am maintaining a high performance CSV parser and try to get the most out of latest technology to improve the throughput. For this particular tasks this means: Flash memory (We own a relatively inexpensive PCI-Express card, 1 TB of storage that reaches 1 GB/s sustained read performance) Multiple cores (We own a cheap Nehalem server wi...

PHP - character encoding

Is it possible to convert Aoibhín back to Aoibhín ? If it is how can it be done? Thanks in advance! ...

Strange special character encoding error

Hi, I have a very strange character encoding error: I am sending a textfield to a script via jQuerys ajax function. Assuming I want to send the euro sign echo $string; produces € however echo base64_decode(base64_encode($string)); produces € any hints on how I could debug this problem? ...

WSGI content encoding

If I execute the following Python 3.1 program, I see only � instead of the correct characters in my browser. The file itself is UTF-8 encoded and the same encoding is sent with the response. from wsgiref.simple_server import make_server page = "<html><body>äöü€ßÄÖÜ</body></html>" def application(environ, start_response): start_res...

Qt localization: loading the localizable string probelm

Hi, i want to load the localized string in Qt application. for this i am following few steps, correct me if i am wrong. Note: it works fine for QString but not for const char* 1)update the pro file with translation language 2)generate .ts & edit using Qt linguist. Generate .qm file using lupdate and lrelease. 3)load the .qm file from ...

Javamail changing charset of subject line

I am using Javamail (javax.mail) to send mails. I successfully adjusted contents of my mail as utf-8. However I could not set subject line as a utf-8 encoded string. I tried even mail.setSubject(new String(subject.getBytes("utf-8"), "utf-8")); on subject however it still sends as Cp1252. Example headers from mail are given below: An...

What is the "best practice" for choosing character encoding with PHP/MySQL applications?

I'm self-taught php programmer, so I often don't know the "correct" way to do something. I want to normalize my character encoding practices between my PHP, HTML, and MySQL data. -- live in the US, -- work on sites for people who speak English, -- most foreign languages I will encounter are western (Spanish, Italian, French) -- living...

Cannot get Chinese characters correctly with ResetSet.getString

My project requires me to write a web application with JSP to communicate with Oracle 10g R2 The JSP/Javascript/HTML is held in OC4J 9i and the database is created with characterset as UTF-8. The interface between JSP and Oracle is based on JDBC Thin driver I tried to type in some Chinese characters on JSP page, then save to Oracle. In...

NHibernate, SQLite, and Cyrillic characters: case sensitivity and fallback queries

I'm querying an SQLite database using NHibernate. Generally, I want to do case insensitive string queries. Recently, I've discovered that although I can insert a row with Cyrillic characters, I can not select it using a case insensitive query. This is what the query looks like: string foo = "foo"; IList<T> list = session.CreateCriteria(...

exporting php output as excel

include_once 'mysqlconn.php'; include_once "functions.php"; $filename = $_GET['par'].".xls"; header("Content-type: application/x-msexcel"); header('Content-Disposition: attachment; filename="'.basename($filename).'"'); if ($_GET['i'] == "par1") { func1(); } else if ($_GET['i'] == "par2") { echo "şşşıııİİİ"; func2(); } else if (...

Redirecting Servlet to Unicode-Domains

I'm having problems with sending redirections to servlet with Unicode-URLs. i.e. consider the following url in Turkish http://türkçeisimtescil.com It works if you paste it into your browser's address bar. However it is translated to http://xn--trkeisimtescil-ijb74a.com by your browser upon your request. Let's say I have fir...

Why is loadURIWithFlags not using the charset that I'm passing to it?

I have an HTML document stored in a file, with a UTF-8 encoding, and I want my extension to display this file in the browser, so I call loadURIWithFlags('file://' + file.path, flags, null, 'UTF-8', null); but it loads it as ISO-8859-1 instead of UTF-8. (I can tell because ISO-8859-1 is selected on the View>Character Encoding menu, and be...

Resolving URI character encoding issues in Rails

I'm working with a Ruby on Rails application that makes a client side API call to a 3rd party service. It then takes strings from the 3rd party API and generates URIs with them. Unfortunately, Rails fails to parse some of the URIs due to encoding errors. I have tried running the strings through encodeURIComponent, but this does not reso...