[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] python utf8 problem



On Mon, 28 Feb 2005 19:52:20 +0100, Carsten Svaneborg wrote:

Hej Carsten
> 
> Jeg har kigget på dem men jeg syntes ikke at
> s=encode("utf8-streng","UTF-8") giver nogen mening, men jeg har ikke
> forsøgt det.
> 
> Det jeg vil er at komme fra "UTF8 streng" til u"UTF8 streng" uden
> de/en-coding.
[en|de]code er lidt ulogisk i Python, og så alligevel ikke:-)
Hvis vi antager følgende:
input: utf-8
output: latin-1
args[1] = u"æøå"
print args[1].decode("utf-8").encode("latin-1")

input: latin-1
output: utf-8
args[1] = "æøå"
print args[1].decode("latin-1").encode("utf-8")

-- 
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *