try to use "locale" with german and coepage 437 (dos)

Discussion in 'Perl Misc' started by mathias wündisch, Mar 8, 2008.

  1. Hi,

    i look for informations about the use of the perl pragma "locale". the
    reason why: i have old input data coded with codepage 437. and i want
    to use the normal matchingcharacter \b (non alphabetic char) and \w
    (alphabetic char).
    i found a lot of site about posix under linux but i work under windows
    xp. am i the first with this problem?
    i want to tell perl what byte between 32 and 255 is a allphabetical
    character (\w) and what is not (\b).
    thanks for ideas.

    bye, mathias
     
    mathias wündisch, Mar 8, 2008
    #1
    1. Advertising

  2. mathias wündisch

    jm Guest

    mathias wündisch a écrit :
    > Hi,
    >
    > i look for informations about the use of the perl pragma "locale". the
    > reason why: i have old input data coded with codepage 437. and i want
    > to use the normal matchingcharacter \b (non alphabetic char) and \w
    > (alphabetic char).
    > i found a lot of site about posix under linux but i work under windows
    > xp. am i the first with this problem?
    > i want to tell perl what byte between 32 and 255 is a allphabetical
    > character (\w) and what is not (\b).
    > thanks for ideas.
    >
    > bye, mathias
    >

    What's about using Encode module, with decode function to transform your
    IBM/CP 437 data to utf-8, and then using utf-8 (transparently) behaviour
    of perl regex?
     
    jm, Mar 9, 2008
    #2
    1. Advertising


  3. > What's about using Encode module, with decode function to transform your
    > IBM/CP 437 data to utf-8, and then using utf-8 (transparently) behaviour
    > of perl regex?


    dear jm, ok this is a good idea! i will try this. thanks for
    suggestion. m.
     
    mathias wündisch, Mar 15, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maurice Hulsman
    Replies:
    1
    Views:
    1,911
    Guus Bosman
    Jul 25, 2004
  2. Jacqueline Leigh
    Replies:
    0
    Views:
    290
    Jacqueline Leigh
    Jul 22, 2006
  3. tomhr
    Replies:
    27
    Views:
    1,455
    Mike Wahler
    Jan 12, 2006
  4. Replies:
    4
    Views:
    1,046
  5. zade
    Replies:
    1
    Views:
    641
    James Kanze
    Mar 5, 2010
Loading...

Share This Page