unicode

What are some good fonts for User Interfaces? And what about Unicode?

Hi, I am working on a user interface, and I am wondering what fonts do other software use like Photoshop, Windows, etc use in their interface. They can't be using Arial and Tahoma, right? This is a web application I am working on, and I can use @font-face. But what about Unicode support? I would not like to put any limits on i18n. ...

How to Display Multiple Language Characters in a Control

STEP 1: I have a text file, which has the following contents in different languages, and i saved the file by encoding format as "Unicode". Romanian: Pot să mănânc sticlă și ea nu mă rănește. Ukrainian: Я можу їсти шкло, й воно мені не пошкодить. Armenian: Կրնամ ապակի ուտել և ինծի անհանգիստ չըներ։ Georgian: მინას ვჭამ და არა მტკივა. Hin...

PyObjC giving strange error - [OC_PythonUnicode representations]: unrecognized selector sent to instance 0x258ae2a0

I have this line: NSWorkspace.sharedWorkspace().setIcon_forFile_options_(unicode(icon),unicode(target),0) Why does it give that error and how do I fix it? Thank you. ...

Python 3 argument (semi)not UTF-8 when passed from Windows batch.cmd

When I invoke a Python 3 script from a Windows batch.cmd, a UTF-8 arg is not passed as "UTF-8", but as a series of bytes, each of which are interpreted by Python as individual UTF-8 chars. How can I convert the Python 3 arg string to its intended UTF-8 state? The calling .cmd and the called .py are shown below. PS. As I mention in a ...

Visual Studio 2008 - Default Encoding style with .SQL files

Tools used: Visual Studio 2008 Team Foundation Server or Visual Source Safe Backstory: We add our SQL files to our source control. We do this by adding them to the solution with the .sql extension and checking them in. By default these files are saved as unicode. What that means is that user A can save foo.sql and user B can get late...

Python UTF-8 comparison

a = {"a":"çö"} b = "çö" a['a'] >>> '\xc3\xa7\xc3\xb6' b.decode('utf-8') == a['a'] >>> False What is going in there? edit= I'm sorry, it was my mistake. It is still False. I'm using Python 2.6 on Ubuntu 10.04. ...

Find similar ASCII character in Unicode

Does someone know a easy way to find characters in Unicode that are similar to ASCII characters. An example is the "CYRILLIC SMALL LETTER DZE (ѕ)". I'd like to do a search and replace for similar characters. By similar I mean human readable. You can't see a difference by looking at it. ...

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...

Is there a unicode character that looks like an ascii one (but isn't equal)?

I'm wanting to write an pre-interview question (for java, but that's not important) that has a different answer if you look at it vs if you copy-paste it and run it so that we can check if people actually do the problem manually. To do this, I'm trying to find a unicode character that will look the same as an ascii character on-screen ...

Python not sorting unicode properly. Strcoll doesn't help.

I've got a problem with sorting lists using unicode collation in Python 2.5.1 and 2.6.5 on OSX, as well as on Linux. import locale locale.setlocale(locale.LC_ALL, 'pl_PL.UTF-8') print [i for i in sorted([u'a', u'z', u'ą'], cmp=locale.strcoll)] Which should print: [u'a', u'ą', u'z'] But instead prints out: [u'a', u'z', u'ą'] ...

Exotic names for methods, constants, variables and fields - Bug or Feature?

Hi, after some confusion in the comments to Is it safe to have 1 letter class names in PHP, e.g A, B, C I thought I make into a question. According to the PHP manual, a valid class name should match against [a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*. But apparently, this is not enforced, nor does it apply for anything else: define('π'...

Python: Unicode and ElementTree.parse

Hi, I'm trying to move to Python 2.7 and since Unicode is a Big Deal there, I'd try dealing with them with XML files and texts and parse them using the xml.etree.cElementTree library. But I ran across this error: >>> import xml.etree.cElementTree as ET >>> from io import StringIO >>> source = """\ ... <?xml version="1.0" encoding="UTF-...

sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings

Using SQLite3 in Python, I am trying to store a compressed version of a snippet of UTF-8 HTML code. Code looks like this: ... c = connection.cursor() c.execute('create table blah (cid integer primary key,html blob)') ... c.execute('insert or ignore into blah values (?, ?)',(cid, zlib.compress(html))) At which point at get the error: ...

Detect if any right-to-left language is installed

What is the easiest way to detect whether any right-to-left language is installed on the host Windows OS? (I need this in order to know if LTR marks will be displayed as squares, or work properly on the host OS) ...

Replace Unicode Control Characters, existing solution ?

Hi all, I need to replace all special control character of a string in Java. My need is for ask the google map api V3. And google doesn't seems to like this characters. Example : http://www.google.com/maps/api/geocode/json?sensor=false&amp;address=NEW%20YORK%C2%8F This url contains this character : http://www.fileformat.info/info/uni...

How to parse a string of fullwidth integer characters to an integer in ruby

How can I parse a string of fullwidth unicode integer characters to an integer in ruby? Attempting the obvious results in; irb(main):011:0> a = "\uff11" => "1" irb(main):012:0> Integer(a) ArgumentError: invalid value for Integer: "\xEF\xBC\x91" from (irb):12:in `Integer' from (irb):12 from /export/home/henry/apps/bin/...

Understanding Unicode composed character sequences within an NSString

I'm trying to understand NSString's and the complexities regarding composed character sequences. I'm having troubles creating strings containing these composed character sequences for me to be able to play around with them. I've seen the Unicode list of sequences but I'm unable to find these characters in the Mac OS X character selecto...

How do I quote a UTF-8 String Literal in Sqlite3

I'm looking to encode and store Unicode in a Sqlite database. Is there any way to raw encode a UTF-8 (unicode) string literal in a sql query. I'm looking for something similar to java where I can toss a \u00E9 into a string and have it automagically upconvert to Unicode. ...

ufpdf in xampp 1.7.2

I used ufpdf to generate pdf files with Unicode/UTF-8 in PHP. It works properly in xampp 1.6.7 for windows. However, I tested it in xampp 1.7.2(window), it doesn't work and I got like that: "%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream x�3R��2�35W(�r Q�w3T06�30PISp �Z*�[��Y+��..." What shall I do? ...

RichTextBox.RTF return unicode format or ANSI format?

Recently, i'm very confused about the RTF format. I check the RTF 1.6 spec from MSDN, which is native supported in .Net. RTF 1.6 will support Unicode by \uN, and for ANSI, RTF will support multiple byte language via codepage. If we use RichTextBox.RTF to retrieve the RTF format, which format will be returned? Unicode? or ANSI multiple by...