Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
No, my boss requires every source code to be strictly in japanese

Does your boss also require that all source code files be strictly in a single character encoding scheme of the Unicode coded character set? If she doesn't, she should. In the case of computer programs, the character encoding of the source code file is as important to the computer as the natural language is to the programmer (and to the programmer's boss).

Think of your problem as two-fold. Firstly, you have a text file character encoding conformance problem. What do you do in your programming environment to ensure that all source code files for all projects are in the same coded character set (e.g., Unicode) and character encoding scheme (e.g., UTF-8)? What discipline do you impose on your programming team to ensure that, for example, no programmer inadvertently creates a source code file in the Shift-JIS character encoding? You should apply some rigor to enforcing that all source code files are in the UTF-8 CES of the Unicode CCS, and that they always include the Unicode byte order mark in them.

Secondly, you have a Perl multiple source code file inclusion à la do() problem. But when you've solved the first, more fundamental character encoding conformance problem in the way I've suggested, you've also solved this second, more coincidental problem.

(N.B. The memory footprint of the Unicode byte order mark is quite small.)

Jim


In reply to Re^5: avoid writing 'use utf8' in every script by Jim
in thread avoid writing 'use utf8' in every script by reqnode

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-26 07:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found