[TYPO3-linux] UTF problems on AIX

marius popa mapopa at reea.net
Thu Mar 9 17:37:20 CET 2006


Dimitri Tarassenko wrote:
> Marius,
>
> On 3/9/06, marius popa <mapopa at reea.net> wrote:
>   
>> we run typo3 on an aix server with php compiled as cgi bin interpreter
>>
>>  if ($title && $title != $upper) $utf8CaseFolding['toTitle'][$utf8_char]
>> = $this->UnumberToChar(hexdec($title));
>>     
>
> This function (UnumberToChar) converts UNICODE numbers to UTF-8
> multibyte characters. The way it is coded is by bitwise shift.
>
> Since you mention you run AIX, I would suspect there might be a
> problem with byte-order while converting to/from Unicode.
>
> Is youre server big-endian or little-endian?
>   
it's an  big endian for shure

gcc endian.c
$ ./a.out
big-endian
$ cat endian.c

int
main(int argc, char **argv)
{
    union {
      short  s;
      char   c[sizeof(short)];
    } un;

    un.s = 0x0102;
    if (sizeof(short) == 2) {
        if (un.c[0] == 1 && un.c[1] == 2)
            printf("big-endian\n");
        else if (un.c[0] == 2 && un.c[1] == 1)
            printf("little-endian\n");
        else
            printf("unknown\n");
    } else
        printf("sizeof(short) = %d\n", sizeof(short));

    exit(0);
}

-- 
Regards,
Linux admin team

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.netfielders.de/pipermail/typo3-linux/attachments/20060309/76dffefd/attachment.html 


More information about the TYPO3-linux mailing list