Форум · Полнота восстановления · Каталог вариантов

[Share] Account administration PHP — Kenjiro — #84341

Сообщение в форуме

Снимок 2008-10-27 16:04 UTC

Имя в снимке: Kenjiro · Источник Wayback

I could help, good way is sharing experience with problems in that forum.


Yesterday i finally found way to correctly display national characters from mssql db, eg:

Code:

[code]select nickname from user_data ...[/code]

results in some garbage instead of national chars from mssql_fetch_array, but you could use:

Code:

[code]select nickname collate your_local_collation from user_data ...[/code]

thus correctly get all national chars.


For inserting strings to cached functions you could use:

Code:

[code]function ansi2unicode ( $ansi_str ) {
  return ( iconv ( "CP1250", "UCS-2LE", $ansi_str ) . chr ( 0 ) . chr ( 0 ) );
}[/code]

change "CP1250" to your windows locale charset.


If you have questions, feel free to ask PM.