I have a very simple macro that I use for shorthand when declaring exceptions. When in debug mode it adds the current file and line number.
I'm in the process of modifying my code to support unicode, and suddenly I'm getting "undeclared identifier" errors whenever my macro is used. I'm probably missing something really simple, as the ...
Hi all
I am facing a strange problem. I am using sprintf or swprintf according to the build defines with or without unicode. I have wrapped these functions in my own function like this:
int mysprintf( MCHAR* str,size_t size, const MCHAR* format, ... )
{
#ifdef MYUNICODE
return swprintf( str, size, format);
#else
return snprintf...
If a picture's worth 1000 words, how much of a picture can you fit in 140 characters?
Note: That's it folks! Bounty deadline is here, and after some tough deliberation, I have decided that Boojum's entry just barely edged out Sam Hocevar's. I will post more detailed notes once I've had a chance to write them up. Of course, everyone shou...
Hi,
Having some issues getting my head around the differences between UTF-8, UTF-16, ASCII and ANSI. After doing some research I have some idea but it would be really useful if someone could explain exactly the difference between them (including the byte representation of a typical character from each).
I quess my question boils down t...
I am writing a function that transliterates UNICODE digits into ASCII digits, and I am a bit stumped on what to do if the string contains digits from different sets of UNICODE digits. So for example, if I have the string "\x{2463}\x{24F6}" ("④⓶"). Should my function
return 42?
croak that the string contains mixed sets?
carp that the...
An ASP.NET project I am working on will be adding localization in the next version. As we pull text from our ASPX pages into resource files and other data into database tables, what tools might we want to evaluate to assist this process?
Are there any tools to assist translators to create the localization files?
...
Hi
I want to give the user the ability to import a csv file into my php/mysql system, but ran into some problems with encoding when the language is russian which excel only can store in UTF-16 tab-coded tab files.
Right now my database is in latin1, but I will change that to utf-8 as described in question "a-script-to-change-all-tables...
If I run my C++ application with the following main() method everything is OK:
int main(int argc, char *argv[])
{
cout << "There are " << argc << " arguments:" << endl;
// Loop through each argument and print its number and value
for (int i=0; i<argc; i++)
cout << i << " " << argv[i] << endl;
return 0;
}
I get wha...
I have previously read Spolsky's article on character-encoding, as well as this from dive into python 3. I know php is getting Unicode at some point, but I am having trouble understanding why this is such a big deal.
If php-CLI is being used, ok it makes sense. However, in the web server world, isnt it up to the browser to take this i...
Hi all,
I have a simple question to ask. I have a UTF 16 text file to read wich starts with FFFE. What are the C++ tools to deal with this kind of file? I just want to read it, filter some lines, and display the result.
It looks simple, but I just have experience in work with plain ascci files and I'm in the hurry. I'm using VS C++, b...
Unicode has a set of characters for punctuation such as ellipsis (…), En-Dash (–) and others. It's believed that using these characters improves typography and therefore visual appearance of the texts.
Many development tools, Visual Studio included, support Unicode and so I could easily make use of these characters in programs resources...
Why is it so hard to figure out how to draw Unicode characters on the iPhone, deriving simple font metrics along the way, such as how wide each imaged glyph is going to be in the font of choice?
It looks like it'd be easy with NSLayoutManager, but that API apparently isn't available on the phone. It appears the way people are doing this...
I have the following test which seems to produce same strings but Assert.AreEqual fails.
[TestMethod]
public void Decompressed_test_should_equal_to_text_before_compression()
{
TextCompressor compressor = new TextCompressor();
Random r = new Random((int)DateTime.Now.Ticks);
for (int i = 500; i < 1500; i++)
{
char...
I know of the non-standard %uxxxx scheme but that doesn't seem like a wise choice since the scheme has been rejected by the W3C.
Some interesting examples:
The heart character.
If I type this into my browser:
http://www.google.com/search?q=♥
Then copy and paste it, I see this URL
http://www.google.com/search?q=%E2%99%A5
which mak...
I have some javascript which reads some cookies, and does some matching. I am using groupings to catch parts of a regular expression and use them later. I am having an issue with unicode characters though. If I have a character like \u25BA ►, when I find this character in a grouping, it returns the string '\u25BA' instead of the unicode ...
Are there any rich editors for WinForms that support right-to-left and can export to HTML?
The standard RichTextBox cannot export to HTML (Is there an RTF to HTML converter?)
DevExpress's XtraRichEdit doesn't support right-to-left.
...
hey guys,
I am trying to display some nepali langauage charcaters in my spring MVC webapp with freemarker,
i did everything like i have character encoding filter in my web.xml
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
...
Can someone explain to me this odd thing:
When in python shell I type the following Cyrillic string:
>>> print 'абвгд'
абвгд
but when I type:
>>> print u'абвгд'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-9: ordinal not in range(128)...
hi,
I am working in a application that takes unicode string as a input. I successfully obtained the sets of words as a list. Now i need to search the input string in the given sets of string that are in the list. I tried to compare the given string with each string in the list but only gets the unrecognised characters as an output. I thi...
I am trying to figure out PyObjC on Mac OS X, and I have written a simple program to print out the names in my Address Book. However, I am having some trouble with the encoding of the output.
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
from AddressBook import *
ab = ABAddressBook.sharedAddressBook()
people = ab.people()
for person...