[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
 

UTF-8 check



Hejsa,

Jeg har brug for i Perl 5.6.1 at checke, om en given streng er UTF-8
valid. Først troede jeg faktisk, at alle strenge var valide i UTF-8
forstand, men jeg tog fejl.

Hvis perl fortolkeren invokes med "use utf8" pragmaen, så kan den - og
skal formentlig heller - ikke håndtere karakterer i f.eks. latin-1,
hvorfor den giver en warning.

Det ville være rart, hvis der fandtes en generel funktion, der checker en
streng for, om den er korrekt UTF-8 enkodet.

Jeg har googlet lidt rundt og fundet funktionen utf8::valid, men af en
eller anden grund, vil Perl fortolkeren ikke kendes ved denne funktion :-(

Er der nogen, der har fundet en løsning på dette problem?

Hygge,

--Anders


-------------------------------------------
Cand.scient. Anders Sønderberg Mortensen
Dronning Olgas Vej 55A, st.tv.
DK-2000 Frederiksberg
DENMARK

Phone: + 45 38 86 57 20
-------------------------------------------



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 19:55 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] *