|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
special characters. unicode utf8
Hi there,
I need some guidance in the following problem. I' building a file named convert.py which reads sewdish docs and converts all ó to o and all â to a. In general, what I need is to get rid of the special characters and convert them to regular ones. I've trying to use encode, decode, utf8 and unicode but with no success. Can someone help me? Cheers, I |
|
#2
|
||||
|
||||
|
I suspect the reason encode and decode arn't working is because sweedish is a language
not an encoding.. if you could post your code i'd be glad to take a look, also, do you have a list of special chars you need converting? (by special chars i'm assuming you mean like â and ó)I cant imagin this would be too hard to pull off if we're talking txt docs, not Microsoft word right? Mark |
|
#3
|
|||
|
|||
|
It depends on how flexible you want to be. Doing the simplest thing, just reading an UTF8-encoded file in, containing just "åäö", they showed up as: "\xc3\xa5\xc3\xa4\xc3\xb6". This means a simple replace will change the characters.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > special characters. unicode utf8 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|