SunQuest
           Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old October 18th, 2003, 07:56 PM
initpcsys initpcsys is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 11 initpcsys User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 19th, 2003, 07:13 AM
netytan's Avatar
netytan netytan is offline
Hello World :)
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2003
Location: Hull, UK
Posts: 2,529 netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level)netytan User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 17 h 19 m 5 sec
Reputation Power: 63
Send a message via ICQ to netytan Send a message via AIM to netytan Send a message via MSN to netytan Send a message via Yahoo to netytan
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
__________________
programming language development: www.netytan.com Hula


Reply With Quote
  #3  
Old October 19th, 2003, 08:25 AM
percivall percivall is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 133 percivall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > special characters. unicode utf8


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway