summaryrefslogtreecommitdiff
path: root/t/charset_tools.pl
Commit message (Collapse)AuthorAgeFilesLines
* t/charset_tools.pl: Avoid some work on ASCII platformsKarl Williamson2019-12-191-15/+22
| | | | | | | This sets things up so that functions on ASCII simply return their arguments, and don't have extra stuff in them for EBCDIC. It also moves an array initialization out of a function, so it is only done once, and doesn't initialize it on ASCII, as it isn't needed there.
* t/charset_tools.pl: Add commentsKarl Williamson2019-04-031-0/+6
|
* Move I8 test helpers to common fileKarl Williamson2017-01-221-0/+34
| | | | | | This moves the code that helps in testing I8 (which is the same as UTF-8 on non-EBCDIC platforms) to t/charset_tools.pl, away from the .t where they previously were. This means these can now be used in other .t's.
* t/charset_tools.pl: Improve function namesKarl Williamson2015-01-141-2/+2
| | | | | | | | 'latin1_to_native' and 'native_to_latin1' actually operate on all code points, not just the ranges implied by their names. This commit changes the names to reflect that, to 'uni_to_native' and 'native_to_uni'. The old names have only been available since 5.21, so there is no backcompat issue.
* charset_tools.pl: Fix changed function nameKarl Williamson2014-10-211-1/+1
| | | | | The function has changed names, but this file did not get updated to reflect that.
* Create new testing helper fileKarl Williamson2014-05-311-0/+142
This adds t/charset_tools.pl, and populates it with 2 functions removed from t/test.pl. The functions are changed very slightly to use the variables $::IS_ASCII and $::IS_EBCDIC instead of recalculating this information. A new function byte_utf8a_to_utf8n() is also placed in charset_tools. This takes the bytes that form a (ASCII-platform) UTF-8 string and convert them to the bytes that form that string on the native platform, hence just returns the input if run on an ASCII platform.