Jump to content
php.lv forumi

RTF valodas masīvs


Mikijs

Recommended Posts

Sveiki php.lv cilvēki!

Teikšu atklāti, jūtos kā galīgi zaļš =) kādu laiciņu nebiju bijis, te pēkšņi reorganizācija :) mm .. Skaist :)

 

Ok tad pie lietas,

mūsdienās cilvēki izmanto RTF failus, kuros glabā visādus dokumentus un vēl sazin ko. Saucās "Ritch text format".

interesē vai kādam ir RTF alfabēta masīvs php vidē ? Domāju ka vajadzētu būt skaidram ..

 

Piemērs..

<?php
$masivs = array ( "š" => "\\\'f0", "ņ" => "\\\u326\\\'3f" ); 
?>

Link to comment
Share on other sites

Sveiks, Mikij!

 

Wikipēdijā par RTFu rakstīts:

Character encoding

 

RTF is an 8-bit format. That would limit it to ASCII, but RTF can encode characters beyond ASCII by escape sequences. The character escapes are of two types: code page escapes and Unicode escapes. In a code page escape, two hexadecimal digits following an apostrophe are used for denoting a character taken from a Windows code page. For example, if control codes specifying Windows-1256 are present, the sequence \'c8 will encode the Arabic letter beh (ب).

 

If a Unicode escape is required, the control word \u is used, followed by a 16-bit signed decimal integer giving the Unicode codepoint number. For the benefit of programs without Unicode support, this must be followed by the nearest representation of this character in the specified code page. For example, \u1576? would give the Arabic letter beh, specifying that older programs which do not have Unicode support should render it as a question mark instead.

 

The control word \uc0 can be used to indicate that subsequent Unicode escape sequences within the current group do not specify a substitution character.

tātad - vari droši kodēt formātā \u - kur sekojošais kods ir Unicodē

Link to comment
Share on other sites

mūsdienās cilvēki izmanto RTF failus, kuros glabā visādus dokumentus un vēl sazin ko. Saucās "Ritch text format".

Vispār jau mūsdienās RTF izmanto tikai retais, vismaz es tik bieži tādiem neuzduros. Pārsvarā cilvēki izmanto doc, docx vai odt dokumentu glabāšanai.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...