encoding

C++ and Qt - encoding from page-content

Hello. Here is link where i got a code for web-page content fetching. But i have a trouble: i got text in wrong encoding. Could i correct it? Thanks. EDIT: I'm trying to get data from page: http://ru.wiktionary.org/wiki/example And got: EDIT2: I just save all data to the html-file and show it in QWebView. ...

C Library for compressing sequential positive integers

Hi, I have the very common problem of creating an index for an in-disk array of strings. In short, I need to store the position of each string in the in-disk representation. For example, a very naive solution would be an index array as follows: uint64 idx[] = { 0, 20, 500, 1024, ..., 103434 }; Which says that the first string is at po...

UTF-8 Problem, no Idea

Hi, I have a strange problem with some documents on my webpage. My data is stored in a MYSQL Database, UTF8 encoded. If read the values my webbpage displays Rezept : Gem�se mal anders (Gem�selaibchen) I need ü / ü! Content in the database is "Gemüse ... " .. The raw data in my error_log looks like this [title] => Rezept...

UTF8 Filenames in PHP and Different Unicode Encodings

I have a file containing Unicode characters on a server running linux. If I SSH into the server and use tab-completion to navigate to the file/folder containing unicode characters I have no problem accessing the file/folder. The problem arises when I try accessing the file via PHP (the function I was accessing the file system from was st...

Why shouldn't I use spaces in file names when I can use a code equivalent?

I've read all over the place NOT to use spaces in file names intended for use on the Web, e.g. URLs. I don't understand what's wrong with using "%20" to replace them when referring to the name in my code. It seems more appropriate to use this replacement because I'm then preserving semantic meaning of my file name. ? ...

Can I replace % 20 with & nbsp in URLs that have spaces?

Within my HTML, can I use the character entity reference " " in place of "%20" in Web URLs? They're both spaces, right? ...

context.Response.Charset = Encoding.UTF8.ToString();

I had used this in my code to set the Charset but IE did not like it. Any reason why? context.Response.Charset = Encoding.UTF8.ToString(); I ended up having to set it to just context.Response.ContentType = "application/json;charset=utf-8" or context.Response.Charset = "utf-8"; instead. Not sure then what Encoding.UTF8.ToString(); w...

What does it mean the text in control appear to be all squares?

Hi all, I have a control displaying text, but somehow the text appear to be all squares, why's that? P.S It's an edit control in winform and the original text is in Japanese. Thanks, ...

Unicode problem Django-Python-URLLIB-MySQL

I am fetching a webpage (http://autoweek.com) and trying to process it but getting encoding error. Autoweek declares "iso-8859-1" encoding and has the word "Nürburgring" (u with umlaut) I do: # -*- encoding: utf-8 -*- import urllib webpage = urllib.urlopen(feed.crawl_url).read() webpage.decode("utf-8") it gives me the following err...

Is there much overhead with HTTP uploads?

I have files often uploaded via browser and maybe considering using another method to make uploads faster. When a file is uploaded via browser, is there much overhead due to encoding? Do you know how much? Thanks! ...

Does ASP.NET MVC Handle *#%":?<> Characters In The URL?

I am new to ASP.NET MVC. I am getting an error when i use these characters - *#%":?<> - in URL. My question is - Does ASP.NET MVC handle *#%":?<> characters in the URL? ...

Listings in Latex with UTF-8 (or at least german umlauts)

Trying to include a source-file into my latex document using the listings package, i got problems with german umlauts inside of the comments in the code. Using \lstset{ extendedchars=\true, inputencoding=utf8x } Umlauts in the source files (encoded in UTF-8 without BOM) are processed, but they are somehow moved to the beginning of the...

mysql encoding issue with special character

Hi, I noticed my Rails app returns in place of double quotes and certain dashes, it returns a question mark character-- � Is there a way to update the table and replace them with original characters? Thanks! Amie ...

Why is my ATOM XML UTF-16 and not UTF-8

Hello, I have this code to create an ATOM feed Dim xmlResult As New StringBuilder Dim settings As New XmlWriterSettings Dim atomWriter As XmlWriter = XmlWriter.Create(xmlResult, settings) Dim atomFormatter As Atom10FeedFormatter = New Atom10FeedFormatter(feed) atomFormatter.WriteTo(atomWriter) atomWriter.Close() It returns XML that s...

Is storing URL-encoded text in the database a good idea?

I need to store (possibly long) text in a MySQL database. The text may contain special characters and non-latin letters and it should be possible to perform full-text-search on it. MySQL 5 can't store such characters (but it will be possible in MySQL 6), so I though about URL-encoding the text before storing it and decoding it after fetc...

Encoding issue: vbscript "Chr()" to .Net C#

I can't seem to find the answer to this question. It seems like I should be able to go from a number to a character in C# by simply doing something along the lines of (char)MyInt to duplicate the behaviour of vb's Chr() function; however, this is not the case: In VB Script w/ an asp page, if my code says this: Response.Write(Chr(139...

mediawiki API & encoding

I'm using the mediawiki Api to update some pages with an experimental robot. This robot uses the java apache http-client library to update the pages. (...) PostMethod postMethod = new PostMethod("http://mymediawikiinstallation/w/api.php"); postMethod.addParameter("action","edit"); postMethod.addParameter("title",page.replace(' ', '_'));...

PHP UTF-8 encoding problem of U+009A

I have problems displaying the Unicode character of U+009A. It should look like "š", but instead looks like a rectangular block with the numbers 009A inside. Converting it to the entity "&#x9A;" displays the character correctly, but I don't want to store entities in the database. The encoding of the webpage is in UTF-8. The character...

How to change the encoding of a web service in .Net ?

We are developing a web service in .Net, and our client would like the responses of the service to be encoded in something other than UTF-8. Is it possible? This page seems to indicate it is not possible, but I'd like a second opinion. The service is an asmx webservice. We are considering switching to WCF if it's the only way to go, b...

How to get \uXXXX to display correctly, using PHP5

I have inherited a database which contains strings such as: \u5353\u8d8a\u4e9a\u9a6c\u900a: \u7f51\u4e0a\u8d2d\u7269: \u5728\u7ebf\u9500\u552e\u56fe\u4e66\uff0cDVD\uff0cCD\uff0c\u6570\u7801\uff0c\u73a9\u5177\uff0c\u5bb6\u5c45\uff0c\u5316\u5986 The question is, how do I get this to be displayed properly in an HTML page? I'm using PHP5 ...