classes-Com-Tecnick-Unicode-Convert-Encoding

It appears that you are using AdBlocking software. The cost of running this website is covered by advertisements. If you like it please feel free to a small amount of money to secure the future of this website.

Com\Tecnick\Unicode\Convert\Encoding

Tags
since
2015-07-13
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2011-2015 Nicola Asuni - Tecnick.com LTD

license

http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT)

link
https://github.com/tecnickcom/tc-lib-unicode

Table of Contents

hexToStr()  : string
Convert an hexadecimal string (byte string - as in the PDF standard) to string
latinArrToStr()  : string
Converts an array of Latin1 code points to a string
strToHex()  : string
Convert a string to an hexadecimal string (byte string) representation (as in the PDF standard)
toUTF16BE()  : string
Converts an UTF-8 string to UTF-16BE
toUTF8()  : string
Converts a string with an unknown encoding to UTF-8
uniArrToLatinArr()  : array<string|int, mixed>
Converts UTF-8 code array to Latin1 codes

Methods

hexToStr()

Convert an hexadecimal string (byte string - as in the PDF standard) to string

public hexToStr(mixed $hex) : string
Parameters
$hex : mixed
Return values
string

latinArrToStr()

Converts an array of Latin1 code points to a string

public latinArrToStr(array<string|int, mixed> $latarr) : string
Parameters
$latarr : array<string|int, mixed>

Array of Latin1 code points

Return values
string

strToHex()

Convert a string to an hexadecimal string (byte string) representation (as in the PDF standard)

public strToHex(string $str) : string
Parameters
$str : string

String to convert

Return values
string

toUTF16BE()

Converts an UTF-8 string to UTF-16BE

public toUTF16BE(string $str) : string
Parameters
$str : string

UTF-8 String to convert

Return values
string

UTF-16BE encoded string

toUTF8()

Converts a string with an unknown encoding to UTF-8

public toUTF8(string $str[, mixed $enc = null ]) : string
Parameters
$str : string

String to convert

$enc : mixed = null

Array or comma separated list string of encodings

Return values
string

UTF-8 encoded string

uniArrToLatinArr()

Converts UTF-8 code array to Latin1 codes

public uniArrToLatinArr(array<string|int, mixed> $ordarr) : array<string|int, mixed>
Parameters
$ordarr : array<string|int, mixed>

Array containing UTF-8 code points

Return values
array<string|int, mixed>
 

© 2004-2021 – Nicola Asuni - Tecnick.com - All rights reserved.
about - disclaimer - privacy