character-encoding

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do this like so: int main() { char* str = "Hej du kalleåäö"; printf("length of str: %d", strlen(str)); for (int i = 0; i < strlen(...

GAE Django template and swedish characters

Hi, I'm trying to render templates of an html-page that contains swedish characters "åäö" but when it renders in the web browser it ends up with "�". The page renders in UTF-8. Is there any way to workaround this or do I need to write the chars as html-code? Also any pointers to the best support for multi-lang site? ..fredrik ...

how to show hex code char ?

hi, i have a file contains numbers like FB8E,FB8F,FB90 on each line. i want in my program to load this file and take each line and print the character corresponded to that number/line. for expamle, my firnst line is FB8E, i want something to convert it like #$FB8E (arabic Kaf), how do i do that? ...

How to convert string from one charset to another in C++?

How to convert string from one charset to another in C++ in a portable way? For example I want to convert to wstring to UTF-8 character array or . How to do this? I am asking some standard way no chilkatsoft, wxWidgets, Qt. Its a plain C++ application. Though some simple class or methods will do the job. ...

Adding "charset" to all ASP.NET MVC HTTP responses

Is there an easy way to specify all "normal" views is an ASP.NET MVC app are to have charset=utf-8 appended to the Content-Type? View() lacks an override that allows you to specify the Content-Type, and ActionResult and friends don't seem to expose anything, either. The motivation is obviously to work around Internet Explorer guessing ...

iphone compare &#160; with NSString

Hi, i was comparing A string coming from XML with another String and results were showing that they are not equal. but in NSLog() both were same ( e.g. Valore Books ). then i checked the Source of the XML and i came to know that the actual string is "Valore&#160;Books" and &#160; is infact a space. but the problem is this when i am co...

Checking all files are encoded as UTF-8

Does anyone know of a Windows app that can scan through a directory and check which scripts are/aren't encoded as a specified charset (UTF-8 in this case)? I could do it manually, but that could take a while and is quite error prone! ...

Java web server and PDF files

I have created my own HTTP server. I need to return a PDF file (generated by Jasper Reports) to the web browser. However, when I read the PDF file and write its contents to the socket, the web browser receives a blank PDF file. When I save this file and compare it to the original, I see that many of the characters have been converted ...

Why are some characters shown as question marks when sending email using non-English characters?

I tried to send a text email with non-English characters using PHPs mail function. But instead my message went with funny looking garbage characters. How do I fix it? I use this piece of code: function _mail($to, $subject, $content) { $headers = 'From: [email protected]' . "\r\n" . 'Reply-To: [email protected]' . "\r\n" . 'X-Ma...

convert tchar array to char array

how to convert to tchar[] to char[].. ...

Uploaded file char-set conversion with Ruby

I have an application where we're having our clients upload a csv file to our server. We then process and put the data from the csv into our database. We're running into some issues with char-sets especially when we're dealing with JSON, in particular some non-converted UTF-8 characters are breaking IE on JSON responses. Is there a way ...

charachters in fb apps/mysql

I'm getting � this character in my facebook app instead of "£"- I checked the mysql db and the character is being stored as £. How do i fix this? This has never happened to me before - I'm using PHP as well. ...

How can I read entries from sqlite with german umlauts on iPhone?

How is it possible to read the German umlaut from an sqlite? All I get are weird characters. Thank you! ...

Problems with character encodings in LAMP app - UTF-8 or not?

I'm still learning the ropes with PHP & MySQL and I know I'm doing something wrong here with how character sets are set up, but can't quite figure out from reading here and on the web what I should do. I have a standard LAMP installation with PHP 5, MySQL 5. I set everything up with the defaults. When some of my users input comments to ...

Difference between Url Encode and HTML encode

What’s the difference between an URL Encode and a HTML Encode? ...

How to read files with different encodings using Awk?

How can I correctly read files in encodings other than UTF8 in Awk? I have a file in Hebrew/Windows-1255 encoding. A simple {print $0} awk prints stuff like �. how can I make it read correctly? ...

Cannot show the downloaded webpage with proper encoding using PHP

I have to get the content of a persian page and show a part of that page to some users. The problem is after I filter the page content I cannot show the content with the proper encoding. The webpage is located at sena.ir and here is the screen shot of the original webpage part I want to show: And here is what I got: Here is the fun...

Java clob retrieval using getString - character encoding issue

Hi, So I have a database with a table, where one of it's entries is 'é€áí', and I know this is correct in the db. It is stored as a clob. In Java, I retrieve the entry like so: String text = resultSet.getString(DBConstants.COL_NOTE_TEXT); When debugging, text is equal to 'é\u0080áí' and when displayed on the screen the euro symbol i...

Is there anything to convert HTML special characters in files to normal characters?

Hi, I have some source code files which came to me by an HTML output, so they're pretty unusable. I have things like this: %include &quot;macros.mac&quot; Which should be: %include "macros.mac" Is there any script (sh, perl, batch, ...) to convert every file (there are about 200) to the appropriate characters? Characters include &...

Cleanup PHP String from Web Form Input

I have a web-form that is getting customer information. The form is processed using PHP 5.1.6 so using the filter_input() will not work. The form has a text area along with some other standard fields. I am getting lots of strange formatting codes that are being stored in our MySQL database. How can I filter these results where they lo...