>>> teststring = 'aõ'
>>> type(teststring)
<type 'str'>
>>> teststring
'a\xf5'
>>> print teststring
aõ
>>> teststring.decode("ascii", "ignore")
u'a'
>>> teststring.decode("ascii", "ignore").encode("ascii")
'a'
which is what i really wanted it to store internally as i remove non-ascii characters. Why did the decode("ascii give out a uni...
I have an excel file with numerous non-ascii characters which i would like to replace with the space character.
This text is to be entered into a MySQL database, and it will not import with these characters in the strings. I get a "HY000 Incorrect string value" when trying to post the row.
...
Can I work with Begali charachters(non ASCII) in C?
...
I have used to read that varchar (char) is used for storing ASCII characters with 1 bute per character while nvarchar (varchar) uses UNICODE with 2 bytes.
But which ASCII? In SSMS 2008 R2
DECLARE @temp VARCHAR(3); --CHAR(3)
SET @temp = 'ЮЯç'; --cyryllic + portuguese-specific letters
select @temp,datalength(@temp)
-- results in
--...