character-encoding

C++, Accept lowercase and uppercase letters in a variable.

I want to allow the user to use lowercase or uppercase letters giving the value to the char type variable... Any help?? ...

How can I correctly display characters encoded like — in the browser within the title tag

My <title>The title</title> is based on my headline which can contain extended characters which I store as html entities &#xxx; How can I easily turn these into real characters to make the browser window display them correctly or get them to appear correctly in their current form? ...

How to handle Unicode (non-ASCII) characters in Python?

I'm programming in Python and I'm obtaining information from a web page through the urllib2 library. The problem is that that page can provide me with non-ASCII characters, like 'ñ', 'á', etc. In the very moment urllib2 gets this character, it provokes an exception, like this: (more stack trace) File "c:\Python25\lib\httplib.py", line ...

PHP input filtering - checking ascii vs checking utf8

I need to insure that all my strings are utf8. Would it be better to check that input coming from a user is ascii-like or that it is utf8-like? //KohanaPHP function is_ascii($str) { return ! preg_match('/[^\x00-\x7F]/S', $str); } //Wordpress function seems_utf8($Str) { for ($i=0; $i<strlen($Str); $i++) { if (ord($Str[$i]) ...

windows mobile 6 emulator

i am developing some apps in windows mobile 6 on visual studio 8 and i need to show some information in Hebrew but my emulator doesn't show that language ,instead he show very strange chars how do i set Hebrew font in my emulator so that i will be able to see Hebrew?? ...

Unicode character categories in Ruby

Is there anything in Ruby that will return me an array of characters belonging to a certain Unicode category? In particular, I'd like to have the Mn category so that I can follow the advice on this answer. ...

Displaying the ≥ and ≤ ASCII characters in a C Application

I am currently writing a C application and I need to display the following symbols in the terminal : ≥ and ≤ Their ASCII character codes are 242 and 243 but I can't get them to be displayed in the DOS terminal. Any ideas on how I can do this? ...

How can I write a Java function to return the standard name for a Unicode point?

I want to write a function String getName(int codePoint) { // ???? } which will return the standard name given to the character that the given code point represents. For example getName(0); would return the String "NULL" and getName(33); would return the String "EXCLAMATION POINT". Is there anything in the JDK for this? ...

Converting accented characters in PostgreSQL?

Is there an existing function to replace accented characters with unadorned characters in PostgreSQL? Characters like å and ø should become a and o respectively. The closest thing I could find is the translate function, given the example in the comments section found here. Some commonly used accented characters can be searched us...

mysql java versus c program, difference in characters stored.

Hello, I have two programs- First one being a C program that writes in to mysql database. Second is a java program that reads the data from mysql database. The C program reads list of files in a particular directory and inserts the file names in DB. The Java program reads these rows and tries to do some file processing using these fil...

Encode quotes in HTML body?

Should I encode quotes (such as " and ' -> &rdquo; and &rsquo;) in my HTML body (e.g. convert <p>Matt's Stuff</p> to <p>Matt&rsquo;s Stuff</p>)? I was under the impression I should, but a co-worker said that it was no big deal. I'm dubious but I can't find anything that says it is verboten. Am I mistaken? Is it a best-practice to encode?...

How to Generate all the characters in the UTF-8 charset in .net

I have been given the task of generating all the characters in the UTF-8 character set to test how a system handles each of them. I do not have much experience with character encoding. The approaching I was going to try was to increment a counter, and then try to translate that base ten number into it's equivalent UTF-8 character, but...

ISO-8859-1 encoding to windows-1250 with php?

Hi, i need to import XML to mysql database. It is imported in ISO-8859-1 encoding. Well, it is very old mysql version 4.0.27 + php 4. The problem is - when I take texts from database to website I need to change encoding to windows-1250. I have no idea why, but iconv or mb_convert_encoding doesnt work (it does something, but it still lo...

Passing foreign language characters to/from a database

I am trying to allow users to enter Hebrew characters into certain fields in an HTML form (processed using java). I did some research, and it is apparent that the following tag needs to be part of the HTML document: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> That being done, I am having the following result...

URI Escape C++ wstring

I am looking for a good way to do a URI Escape in C++ that would be reasonable for a cross platform project. I would like a function that would take a string like this: L"jiayou加油" And return: L"jiayou%E5%8A%A0%E6%B2%B9" I looked at using some thing like this, with minor modifacations to use wchar_t. However that would require con...

Character encoding problem with email format

Hi , I have a simple jsp form that the customer uses to send us emails. Though on some occasions the emails come through incorrectly formatted with the text =?ISO-8859-1?Q? sporadically displayed throughout the text of the email. I know that ISO-8859-1 is a character encoding though I am not sure how this error is occurring and have ...

Guessing the encoding of text represented as byte[] in Java

Given an array of bytes representing text in some unknown encoding (usually UTF-8 or ISO-8859-1, but not necessarily so), what is the best way to obtain a guess for the most likely encoding used (in Java)? Worth noting: No additional meta-data is available. The byte array is literally the only available input. The detection algorithm ...

PrintWriter Encoding Problem

Hi, I´m developing a netsh thread that keeps netsh open so I just have to call it once. Everything worked fine until I tried my app in a Spanish-Windows enviroment... netsh tells me that it can´t find the interfaces I´m specifying on the commands and I´m pretty sure that the cause of this is because some of these interfaces names have...

charset for spanish windows

what is the charset for spanish windows? ...

How to display Chinese characters in ListView?

Hello there, maybe anyone have ideas of how to display Chinese characters in the ListView control ? ...