character-encoding

A bug in encoding while storing html-based blog posts using php and jquery

I am writing a code to post html-based blog posts through jquery/ajax to php to amazon s3. I first urlencode the post with this function from php.js - http://phpjs.org/functions/urlencode:573 then send it to a php which stores the content as is to s3. If i read this file naked, it looks fine with slashed for special characters like " '...

What charset to use when sending a response to a javascript XMLHTTPRequest 'get' request

I want to send a response to a get request made by the javascript object 'XMLHTTPRequest.' The response content-type will be 'text/plain'. I would like to add a 'charset' to that (i.e. 'Content-Type:text/plain;charset=UTF-8') What encodings does javascript work with natively and what encodings will work with javascript on all browsers...

Print japanese with jQuery

Hi I'm trying to print some Japanese to a page dynamically using jQuery, and it display nothing recognizable. I don't know what went wrong, I reduced the code to the most straight-forward, and it doesn't fix it. Or maybe it's just me being thick. I use: $('body').append('<p>日本語</p>'); Which should work, right? And I get: 日本語...

Problem with non-ASCII texts in IronPython Studio

I have Installed VS2008 and IronPython Studio (Isolated). Trying to add some Persian text in anywhere (on a bottom, form's title etc), and save the project, an error given. IronPython Studio stops working and damages the project (I can't open it again) Details of the given error: Description: Stopped working Problem signature: Proble...

What encoding scheme should be used in a web project?

We are building a (Java) web project with Eclipse. By default Eclipse uses Cp1252 encoding on Windows machines (which we use). As we also have developers in China (in addition to Europe), I started to wonder if that is really the encoding to use. My initial thought was to convert to UTF-8, because "it supports all the character sets". ...

Smart way to find out string encoding?

I wonder whether it is possible to find what is the encoding of string? I know that it may be impossible for some strings (e.g. that do not have non-ASCII characters). Maybe it is possible to obtain a list of encodings that may be correct (possible) for a given string? I'm looking for some other way than trying to decode/encode and wait...

Tomcat server file download problem with encoding

I am sending a response using the following code: response.setHeader("Content-Encoding","UTF-8"); response.setContentType("text/plain charset=UTF-8"); PrintWriter outWriter = response.getWriter(); String returnString = new String(dataController.translateFile(documentBuffer).getBytes(), "UTF-8"); outWriter.print(returnString); When I r...

Who sets response content-type in Spring MVC (@ResponseBody)

I'm having in my Annotation driven Spring MVC Java web application runned on jetty web server. (currently in maven jetty plugin). I'm tryiing to do some AJAX support with one controller method returning just Strinh help text. Resources are in UTF8 encoding and so is the string, but my response from server comes with content-ecoding: t...

Batch script Latin characters

I am writing a batch script to go through some directories doing an specific task, something like the following: set DBCreationScript=//Here I set the full path for the script echo %DBCreationScript% Problem is the path has got some latin characters (ç, ã, á) and when I run the script, the output shows strange characters, not the ones...

Java: Detect non-displayable chars for a given Character Encoding

Hello! I'm currently working on an application to validate and parse CSV-files. The CSV files have to be encoded in UTF-8, although sometimes we get files in a false encoding. The CSV-files most likely contain special characters of the German alphabet (Ä, Ö, Ü, ß) as most of the texts within the CSV file are in German language. For the ...

URLEncoder and URLDecoder encode and decode Javadoc Note: What if UTF-8 is not used?

So, the javadoc for URLEncoder's encode and URLDecoder's decode have this note in them: Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilites." However, if someone sends in a request with a different encoding type, wouldn't it be a bad idea to encode with UTF-...

How to handle unicode character sequences in C/C++ ?

What are the more portable and clean ways to handle unicode character sequences in C and C++ ? Moreover, how to: -Read unicode strings -Convert unicode strings to ASCII to save some bytes (if the user only inputs ASCII) -Print unicode strings Should I use the environment too ? I've read about LC_CTYPE for example, should I care abou...

WPF: How add check mark to the textblock?

I am wondering if anyone knows the tag for check mark symbol. I need to have it in a texblock. I looked online for any clue and did not find anything that will work with XAML. Thank you in advance. ...

Why haven't ASCII and ISO-8859-1 encoding been relegated to history?

It seems to me if UTF-8 was the only encoding used everywhere ever, there would be a lot less issues with code: Don't even need to think about encoding issues. No issues with mixed 1-2-byte character streaming, because everything uses 2 bytes. Browsers don't need to wait for the <meta> tag specifying encoding before they can do anythin...

Encoding problem in app engine when submitting multipart/form-data forms.

I have a simple form that submits a image to the blobstore and a title for the image. This works on my local devserver but when I deploy my code, non ascii letters in the title become garbled with some kind of mixture of ascii and hex. For example Ísland becomes =CDsland. Note, I am using <meta http-equiv="Content-Type" content="text/...

Compete understanding of encodings and character sets

Can anybody tell me where to find some clear introduction to character sets, encodings and everything releted to these things? Thanks! ...

What programming tangle is more evil than C++ strings?

I came from Java/C# and am amazed at the sheer ugliness of strings in C++, particularly the variety of C++ types invented to make strings more pleasant that all still seem to be in use somewhere (std::string std::wstring CString null terminated strings, null terminated strings of tchars, ....) and whose interoperability and encodings onl...

character encoding issue on website

I have some turkish characters at my website but I am not able to sme characters very well.There is a problem with nonenglish characters. I encoded it with UTF-8 and added some meta tags to fix this issue but the problem still seems same. Could you please look at the website (you can look at the code by using firebug) and tell me where ...

Java (Android) UTF-8 character in string

Hi there, here's my problem, I am receiving a string from a soap Webservice which seems to contain UTF8 encoded %c3%89. This string is a URL i have to reach to get a picture that contains a part of the URL in it. My problem is that the server generating the picture doesn't recognize the %c3%89 encoding and thus doesn't create the right...

Why fgetcsv drops some characters with diacritics?

Similar questions: Some characters in CSV file are not read during PHP fgetcsv() , fgetcsv() ignores special characters when they are at the beginning of line My application has a form where the users can upload a CSV file (its 5 internal users have always uploaded a valid file - comma-delimited, quoted, records end by LF), and ...