I have following code in my django application.
class Status(object):
def __init__(self, id, desc):
self.id = id
self.desc = desc
def __unicode__(self):
return self.desc
STATUS = Status(0, _(u"Some text"))
When I try to display some status (or even coerce it to unicode), I get:
TypeError: coercing t...
We generate HTML from text in an Excel spreadsheet. The text contains unicode representations of international characters. When we use VBA to extract the text and output it to a file, it is written as ANSI (ASCII). Is there a way to preserve the unicode representation using VBA?
Bruce
...
I'm trying to port over some of my old rails apps to Ruby 1.9 and I keep getting warnings about how "Ruby 1.9 doesn't support Unicode normalization yet." I've tracked it down to this function, but I'm getting about 20 warning messages per request:
rails-2.3.5/activesupport/lib/active_support/inflector.rb
def transliterate(string)
wa...
I had some code before I moved to Unicode and Delphi 2009 that appended some text to a log file a line at a time:
procedure AppendToLogFile(S: string);
// this function adds our log line to our shared log file
// Doing it this way allows Wordpad to open it at the same time.
var F, C1 : dword;
begin
if LogFileName <> '' then begin
...
how can i know what is the format code of parameter that comes to my page?
whorking with ASP
some of the character that i see cant found in the DB (access)
i want to know the unicode of the value
...
The history of Encoding Schemes / multiple Operating Systems and Endian-nes have led to a mess in terms of encoding all forms of string data (--i.e., all alphabets); for this reason protocol buffers only deals with ASCII or UTF-8 in its string types, and I can't see any polymorphic overloads that accept the C++ wstring. The question then...
I want to add the Greek letter omega (U+03A9) to a label I've placed on the form. I've already switched the encoding of the form, but how do I set the content of the label such that an omega appears and not UTF char code.
So taking this XAML
<Label Height="25">U+03A9</Label>
I want the U+03A9 to be converted to an omega
in the code ...
I was wondering if there were any way to define the default encoding for htmlentities(). I have a big project going that uses htmlentities calls all over the place, and was wondering if there was a simple way to set it from ISO-8859-1 to UTF-8 as the default character encoding, using something simple like init_set. Or possibly with a sep...
I get strings in different encodings (ID3 tags).
I use e.g. new String( bytes, "UTF-16LE" ) to decode them.
On my device (Motorola Milestone) and in the emulator, this works fine.
But some users complained they get results like "T i t l e n a m e".
I've tried the Sun codepage names instead (e.g. "UnicodeBigUnmarked"), with the same res...
Should i convert every single possible charcter in my xhtml/html code? for both encoding iso-8859-1 vs utf?
If yes then is there any software to convert any needed character (which should be always in entity code) in my xhtml/html. like after complete xhtml coding in dreamweaver or in any editor i will put all code in converter and will...
I have a string in unicode and I need to return the first N characters.
I am doing this:
result = unistring[:5]
but of course the length of unicode strings != length of characters.
Any ideas? The only solution is using re?
Edit: More info
unistring = "Μεταλλικα" #Metallica written in Greek letters
result = unistring[:1]
returns-> ...
I'm using a python library called Guess Language: http://pypi.python.org/pypi/guess-language/0.1
"justwords" is a string with unicode text. I stick it in the package, but it always returns English, even though the web page is in Japanese. Does anyone know why? Am I not encoding correctly?
§ç©ºéå
¶ä»æ¡å°±æ²æéç¨®å¾ ...
I have the following test script on my server:
<?php
echo "Test is: " . $_GET['test'];
?>
If I call it with a url like example.com/script.php?test=ɿ (ɿ being a multibyte character), the resulting page looks like this:
Test is: É¿
If I try to do anything with the value in $_GET['test'], such as save it a mysql database, I have th...
Hi, I am new in this area.
I am currently making a web application, I want to add unicode support in my application. My application is a search based application. I store some keyword and some text in my database, and show the result according to keyword in a search query.
I am using Oracle 10g XE edition and PHP 5.
I know nothing...
I just created the following model:
class Categoria(models.Model):
nombre=models.CharField(max_length=30)
padre=models.ForeignKey('self', blank=True, null=True)
def __unicode__(self):
return self.nombre
Then registered to the admin interface and syncdb'd
Everything ok if I just add plain ASCII chars. But if I add...
How can I convert a decimal code of a character into a Unicode string in C++?
For example, I give it the integer 241, that is the '' spanish letter, and I want to convert it to a Unicode string.
...
I'm surprised I can't find a simple tool for this. Basically, sometimes as a result of text munging, or using some piece of software, I end up with some text that has some troublesome characters - such as looking a lot like other characters, but being distinct from them. I'd like a tool (preferably online, javascript based) where I can p...
Hi,
I'm experiencing issues when converting decimal to currency for Korean Won, Cambodian Riel and Iranian Rial and showing the result to the UILabel text.
Conversion itself passes just fine and I can see correct currency symbol at the debugger, even the NSLog prints the symbol well.
If I assign this NSString instance to the UILabel t...
in a JavaScript, i am using Regex to split(/\W+/) to words.
when i split this, it's returning wrong value
var s3 = "bardzo dziękuję";
s3 = s3.split(/\W+/);
[0]: "bardzo"
[1]: "dzi"
[2]: "kuj"
How to fix this problem? please advice
...
I want to launch default e-mail client application via ShellExecute function.
I.e. I write something like this:
ShellExecute(0, 'mailto:[email protected]?subject=example&body=example', ...);
How can I encode non-US characters in subject and body?
I can't use default ANSI code page, because characters can be anything: chinese chara...