Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re^3: Hangman Assistant

by Jorge_de_Burgos (Beadle)
on Jul 13, 2009 at 14:05 UTC ( #779594=note: print w/replies, xml ) Need Help??

in reply to Re^2: Hangman Assistant
in thread Hangman Assistant

A good line for a perl program aimed at running under various languages under modern Linux systems would be this:

use encoding ':locale';

That way, all calculations about string length (among others) are base on characters and not on bytes. For example, many Spanish characters, under a UTF-8 system such as mine (Ubuntu 9.04), are coded in a 2-byte scheme--but this should be transparent to the programmer. So that length('aņo') yields 4 before adding use encoding ':locale'; and length('aņo') yields 3 after adding use encoding ':locale';.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://779594]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2023-01-28 01:19 GMT
Find Nodes?
    Voting Booth?

    No recent polls found