In the subversion C/C++ API one of the function parameters defaults to a "locale encoding" which apparently is the native encoding used by the platform where the subversion client is running. I've been trying to find out how to use Perl to tell me the "locale" encoding and I'm having no luck. I'm sure I'm just not looking in the right place, but I wonder if one of the esteemed monks would be willing to tell me where this little tidbit is hiding.

So far I have tried:

Many thanks in advance, beth

Note: the subversion perl API does have such a function, called svn_locale_charset(), located in core.i. I'm interested in a pure Perl equivalent.

Note2:The ideal would be platform independent (works on all Perl supported systems), but a stop-gap would be a collection of OS-specific functions that I could wrap together with some OS detection code.


In reply to Is there a variable or function that returns the native platform encoding (APR_LOCALE_CHARSET) by ELISHEVA

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.