Re: EOL characters and multibyte encodings

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: EOL characters and multibyte encodings
Дата
Msg-id 467BBC89.8000104@dunslane.net
обсуждение исходный текст
Ответ на Re: EOL characters and multibyte encodings  ("William ZHANG" <zedware@gmail.com>)
Список pgsql-hackers

William ZHANG wrote:
>>>
>>> It's safe, because you'll be dealing with prosrc inside the backend,
>>> therefore using a backend-legal encoding, and those don't have any ASCII
>>> aliasing problems (all bytes of an MB character must have high bit set).
>>>       
>
> The lower byte of some characters in BIG5, GBK, GB18030 may be less than
> 0x7F and don't have the high bit set. Fortunately, they don't use 0x0D and
> 0x0A (CR and LF).
>
>   
>   

Those are client-only encodings, precisely for this sort of reason, and 
thus not relevant to the present discussion. As Tom points out above, 
when the language handler gets the code it will be encoded in the 
relevant backend encoding which can't be any of these.

(Side note: the restriction by the R parser to unix-only line endings is 
a dreadful piece of design. As Jon Postel rightly said, the best rule is 
"Be liberal in what you accept and conservative in what you send." Just 
about every parser for every language has been able to handle this, so 
why must R be different?)

cheers

andrew


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: Worries about delayed-commit semantics
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Worries about delayed-commit semantics