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.

Encoding

in package

Com\Tecnick\Unicode\Convert\Encoding

Tags
since
2015-07-13
category

Library

author

Nicola Asuni info@tecnick.com

copyright

2011-2024 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

Methods

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, int>
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(string $hex) : string
Parameters
$hex : string

Hex code to convert

Return values
string

latinArrToStr()

Converts an array of Latin1 code points to a string

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

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[, null|string|array<string|int, string> $enc = null ]) : string
Parameters
$str : string

String to convert

$enc : null|string|array<string|int, string> = 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, int> $ordarr) : array<string|int, int>
Parameters
$ordarr : array<string|int, int>

Array containing UTF-8 code points

Return values
array<string|int, int>

Array containing Latin1 code points

On this page
 

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