mrgenator Posted May 16, 2006 Report Share Posted May 16, 2006 Sveiki, Vai ir gadījies kādam konfigurēt php, lai tas saprastu multibyte (UTF-16 (WE81SO8859P1)) kodējumu no DB? Nav īsti skaidrs kas un kā ir jādara... Cik noprotu būtu jālieto mbstring, taču kādas vērtības likt mbstring konfigā.... Link to comment Share on other sites More sharing options...
Delfins Posted May 16, 2006 Report Share Posted May 16, 2006 Nu taču RTFM http://lv.php.net/mbstring ; Set default language mbstring.language = Neutral; Set default language to Neutral(UTF-8) (default) mbstring.language = English; Set default language to English mbstring.language = Japanese; Set default language to Japanese ;; Set default internal encoding ;; Note: Make sure to use character encoding works with PHP mbstring.internal_encoding = UTF-8 ; Set internal encoding to UTF-8 ;; HTTP input encoding translation is enabled. mbstring.encoding_translation = On ;; Set default HTTP input character encoding ;; Note: Script cannot change http_input setting. mbstring.http_input = pass ; No conversion. mbstring.http_input = auto ; Set HTTP input to auto ; "auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS" mbstring.http_input = SJIS ; Set HTTP2 input to SJIS mbstring.http_input = UTF-8,SJIS,EUC-JP; Specify order ;; Set default HTTP output character encoding mbstring.http_output = pass ; No conversion mbstring.http_output = UTF-8 ; Set HTTP output encoding to UTF-8 ;; Set default character encoding detection order mbstring.detect_order = auto ; Set detect order to auto mbstring.detect_order = ASCII,JIS,UTF-8,SJIS,EUC-JP; Specify order ;; Set default substitute character mbstring.substitute_character = 12307 ; Specify Unicode value mbstring.substitute_character = none ; Do not print character mbstring.substitute_character = long ; Long Example: U+3000,JIS+7E7E Link to comment Share on other sites More sharing options...
Roze Posted May 16, 2006 Report Share Posted May 16, 2006 Var arī iconv http://lv.php.net/manual/en/function.iconv.php <? echo iconv('UTF-16','UTF-8',$tavsdblauks); ?> vai nu uz vienalga kādu kodējumu CP1257 CP1251 utt.. Aiz kam WE81SO8859P1 nav pareizs charsets bet gan WE8ISO8859P1 (ja tā nav vienkārši rakstības kļūda) un tas itkā nav īsti UTF character sets - ISO 8859-1 West European .. Link to comment Share on other sites More sharing options...
Recommended Posts