character-encoding

What is a vertical tab?

What was the original historical use of the vertical tab character (\v in the C language, ASCII 11)? Did it ever have a key on a keyboard? How did someone generate it? Is there any language or system still in use today where the vertical tab character does something interesting and useful? ...

How much data can you encode in a single character?

If I were creating a videogame level editor in AS3 or .NET with a string-based level format, that can be copied, pasted and emailed, how much data could I encode into each character? What is important is getting the maximum amount of data for the minimum amount of characters displayed on the screen, regardless of how many bytes the compu...

Adding encoded chars to the url breaks htaccess

Hello Here's my code: RewriteEngine on RewriteRule page/(.*) index.php?url=$1 [NC] When I access page/http://google.com/ = works just fine When I access page/http%3A%2F%2Fgoogle.com%2F = server reports 404 Martti Laine ...

Character encoding problem?

I was testing a webpage that I designed on my Android 2.1 browser but it complains with the following: error on line 1 at Column 39: Unsupported encoding ISO8859-1 Is there anyway to solve this problem? ...

Setting UITextView with NSString loses Encoding?

I'm getting a string from a server call, and Trying to set that string to the value of the text in a UITextField. However, if the text has any special characters, the encoding gets screwed up on those characters. -(void)contentDidLoad:(NSString *)content { NSLog(@" content being put into textfield is : %@", content); self.textF...

Python/feedparser script won't display on CGI/ character coding

#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os import cgi import string import feedparser count = 0 print "Content-Type: text/html\n\n" print """<PRE><B>WORK MAINTENANCE/B></PRE>""" d = feedparser.parse("http://www.hep.hr/ods/rss/radovi.aspx?dp=zagreb") for opis in d: try: print """<B>Place/Time:</B> %s...

char encoding problem in android

Hi, While parsing I am getting some special character and I couldn't parse that character. If I try the char 
 in java I can parse it. But in android I am not able to parse that char. In the simlator/device I am getting it as (box), In log i am getting like â¨. Manually I have tried changing the encoding format in eclipse (Right cli...

Fix Special Characters in String

I've got a program that in a nutshell reads values from a SQL database and writes them to a tab-delimited text file. The issue is that some of the values in the database have special characters (TM, dash, ellipsis, etc.) When written to the text file, the formatting is lost and they come across as junk "™ or – etc" When the value ...

Terminology and concepts surrounding the use of code pages

Hello! I'm in the process of researching code pages and have come across many conflicting uses of terminology, even amongst different Wikipedia entries. I just can't find a source of information that spells out the entire character handling process from start to finish. Could someone well versed in this field suggest ways in which the fo...

PHP search engine problem

Im using Sphider as a search engine for my website, its really easy to work with but im having some major issues with localized characters. All of my html/php pages have the charset defined as UTF-8 and the search and result page from Sphider had charset=ISO-8859-1, when I first used the Sphider "spider" to crawl my website it made all ...

C#: Converting byte[] to UTF8 encoded string

I am using a library called EXIFextractor to extract metadata information from images. This lib in part is using System.Drawing.Imaging.PropertyItem to do all the hard work. Some of the data in PropertyItem, such as Image Details etcetera, are fetched as an ASCII-string stored in a byte[] according to the Microsoft documentation. My pr...

How to handle undecodable filenames in Python?

I'd really like to have my Python application deal exclusively with Unicode strings internally. This has been going well for me lately, but I've run into an issue with handling paths. The POSIX API for filesystems isn't Unicode, so it's possible (and actually somewhat common) for files to have "undecodable" names: filenames that aren't e...

Command line character encoding from PHP's exec()

I'm trying to pass UTF-8 text as an argument to a command line program using php's exec function and have been having problems. I suspect it's due to character encoding issues. When I call locale charmap from the command line, I get: UTF-8. But when I do: <?php echo exec('locale charmap'); ?> I get ANSI_X3.4-1968 How can I change...

Display special characters in PHP

test.php - Using regular IDE(phpDesigner7) <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <body> <?php echo "بوغاليا"; ?> </body> </html> output : ??????? test.html - Using regular IDE(phpDesigner7) <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859...

How can I detect non-western characters?

I want to disallow certain UTF-8 input (server-side), e.g. eastern languages, where example input might be " 伊 ". However, I do want to continue supporting other latin or "latin-like" characters, such as the welsh ŵ and ŷ, so checking against latin-1 is not possible. What are my options? (if language specific, PHP preferred) Thanks ve...

RestEasy csv file upload (multipart / form-data) garbles iso-8859-1 characters in FireFox

I have a multipart / form-data form to upload a csv file to a rest easy (JAX RS) webservice. This file can contain iso-8859-1 characters like for example é. When I upload the file through Firefox these characters are garbled and they end up like a ?. When I upload the file through Internet Explorer everything works fine. I've done a lot...

Storing regional (slovenian) characters in the database

Hello This might be painfully obvious to some (most?) of you, however it has been bugging me for a while now. I have two databases running on the same SQL server (2005). As far as I can see they both have the same language/regional properties. Both have collation set to "Sloveninan_CL_AS" and yet one stores all Slovenian special charac...

How to get a Char from an ASCII Character Code in c#

Im trying to parse a file in c# that has field (string) arrays separated by ascii character codes 0, 1 and 2 (in Visual Basic 6 you can generate these by using Chr(0) or Chr(1) etc.) I know that for character code 0 in c# you can do the following: char separator = '\0'; But this doesnt work for character codes 1 and 2? ...

how do I check the encoding of a file in visual studio 2010?

How can I check whether a file is encoded in UTF-8, ANSI, etc... in visual studio 2010? ...

PHP encoding issue

Hi, I have a trouble displaying Cyrillic characters properly. Looked in forums, tried a few different thing and nothing works. Site runs on PHP / MySQL. MySQL tables charset is utf8, and collation is utf8_general_ci Name entry in DB looks correct (in PhpmyAdmin): Sasha Рукина Output on page http://www.sodaq.com/: Sasha ?????? Inside...