character-encoding

Converting VB6 encoding application into C#

I'm importing files in codepage 1252 encoding to a SQL Server 2008 database. Some data contains a comma that isn't the traditional comma (keycode 44) but instead 8218. The column that contains this value is encrypted via an algorithm in VB6. When I implement the same algorithm in C# I get value 130 which then will does not match 8218...

Rich Text Box character set

When I copy, for example, the word "Çamlık" from a web page into a rich text box (forms application) at runtime, it is displayed as "?aml?k". Is there a setting in the richtextbox control or form or application to fix this? If not, what is the "socially acceptable" method? (.Net 2008) ...

HTML character entity for equal character "="

What is the character entity for the equal character in HTML? I have been looking and I cannot find the character entity reference for that one character. EDIT: I am building a JSLint style validator for HTML. I am not happy with current validators as they only validate syntax requirements and not best practice considerations. I am ...

windows-1252 character 146 is stopping POST data reaching servlet in glassfish v2

An HTTP POST request is made to my servlet. There is a posted form parameter in the http request that my code in the servlet retrieves for further processing named "payload". When the value of the payload includes the windows-1252 character "’" (ascii value 146), HttpServletRequest instance method getParameter("payload") returns null. ...

Characters and symbols in HTML

Hello everyone. I am looking for a list of characters and symbols for use in HTML in PDF or image format. It could be some sort of cheat-sheet. Basically I want a reference list for use in HTML for replacing for example '&' with '&'. I have found the list in http://www.w3schools.com/tags/ref_entities.asp but if anyone can point me to...

Convert ANSI characters to UTF-8 in Java

Is there a way to convert an ANSI string to UTF using Java. I have a custom serializer that uses readUTF & writeUTF methods of the DataInputStream class to deserialize and serialze string. If i receive a string encoded in ANSI and is too long, ~100000 chars long i get the error; Caused by: java.io.UTFDataFormatException: encode...

Character encoding issues when reading XLS files with PHP

I'm using the PHP-Excel-Reader library to read some XLS files and immediately have hit this issue: PHP Notice: iconv() [function.iconv]: Detected an incomplete multibyte character in input string in C:\web\docs\housing\excel_reader2.php on line 1718 The line in question is this: $result = iconv('UTF-16LE', $this->_defaultEncoding...

SOAP character encoding

Hi, I've built a webservice in php/soap, but I'm running into trouble when sending special characters through soap. Is there any way to specify what encoding to use with soap? Do you have to do it in the wsdl file or the client and server scripts? ...

Why are my accented characters breaking in SQL Server 2005?

When I update my database with this command: UPDATE myTable SET Name = 'Hermann Dönnhoff' WHERE ID = 123; SQL Server actually puts 'Hermann Do¨nnhoff' in the field instead. Instead of faithfully inserting the o-umlaut (char(246)), I'm getting two characters ( char(111) + char (168) ). This happens for all characters that have accent ma...

How can I specify the character encoding to be used by OLEDB when querying a DBF?

Is it possible to specify which character encoding should be used by OLEDB when querying a DBF file? A possible work-around would be to encode the query string before the OLEDB call to the DBF file's character encoding and then encode all the results when they are returned. This will work but it would be nice if OLEDB or possibly ADO.N...

c# How to process the string?

Hi! I connect to a webservice that gives me a response something like this(This is not the whole string, but you get the idea): sResponse = "{\"Name\":\" Bod\u00f8\",\"homePage\":\"http:\/\/www.example.com\"}"; As you can see, the "Bod\u00f8" is not as it should be. Therefor i tried to convert the unicode (\u00f8) to char by doing this...

How to change text-encoding to iso-8859-1 in visual studio 2008

My visual studio is now saving files in utf-8. How do i configure visual studio to save it iso-8859-1? ...

Is there an alphabetical character check in prolog?

Greetings, Is there was test or a predicate I can use in prolog to verify that a certain given character is alphabetical? Right now, what I'm doing is: List of unallawed characters: \n -> 10, space -> 32, !->33, .->46, ,->44, :->58, ;->59% % 63->? , 45 -> -, 34->", 39-> % \+memb...

Google translate - getting non english chars

I'm using google translate to translate lots of words which I then store in DB, using this code: http://www.developerfusion.com/community/blog-entry/8391765/translate-text-in-c-using-google- translate/ string txt = Translator.TranslateText("Cosmetics", "en|sr"); Response.Write(txt); Translated text (string txt) shows correctly in bro...

Encoding/decoding REST path parameters

I am trying to find the best way of getting round a design flaw in a web app I'm helping to support. One part of the service passes a parameter ("myparam") to a .jsp page, which in turn calls a REST service including our myparam as a path parameter. The design flaw bit is that myparam should be passed as a form parameter, since it can be...

Why do quotes turn into funny characters when submitted in an HTML form?

I have an HTML form, and some users are copy/pasting text from MS Word. When there are single quotes or double quotes, they get translated into funny characters like: '€™ and ’ The database column is collation utf8_general_ci. How do I get the appropriate characters to show up? Edit: Problem solved. Here's how I fixed it: Ran...

To support Chinese/Japanese characters what should be the character set declaration in HTML document?

I tried with the following string content=”text/html; charset=utf-8” Though I can experiment myself. I don't know Japanese characters so can't verify browsers displaying it correctly or not. Thanks for any help. ...

How do you get what kind of encoding your system uses in c/c++?

In linux terminal one would type locale charmap in order to see what kind of character-encoding your system uses, eg UTF-8. My question is how would you do this using c/c++. (I'm using linux) edit: I tried using nl_langinfo(CODESET) but I got ANSI_X3.4-1968 instead of UTF-8 (which is what I get when typing: locale charmap). Am I...

How to download any(!) webpage with correct charset in python?

Problem When screen-scraping a webpage using python one has to know the character encoding of the page. If you get the character encoding wrong than your output will be messed up. People usually use some rudimentary technique to detect the encoding. They either use the charset from the header or the charset defined in the meta tag or t...

StreamWriter Response output - looks fine in Notepad but accents are garbage in Excel

Hi there, I'm using a technique from another stackoverflow question here, to write a CSV file to the Response output for a User to Open/Save. This is working fine and the file looks good in Notepad, but when I open it in Excel the accented characters are garbage. I assumed this was something to do with the character encoding, so tried m...