pgsql: Add direct conversion routines between EUC_TW and Big5.
От | Heikki Linnakangas |
---|---|
Тема | pgsql: Add direct conversion routines between EUC_TW and Big5. |
Дата | |
Msg-id | E1l56qR-0005Mf-4n@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Add direct conversion routines between EUC_TW and Big5. Conversions between EUC_TW and Big5 were previously implemented by converting the whole input to MIC first, and then from MIC to the target encoding. Implement functions to convert directly between the two. The reason to do this now is that I'm working on a patch that will change the conversion function signature so that if the input is invalid, we convert as much as we can and return the number of bytes successfully converted. That's not possible if we use an intermediary format, because if an error happens in the intermediary -> final conversion, we lose track of the location of the invalid character in the original input. Avoiding the intermediate step makes the conversions faster, too. Reviewed-by: John Naylor Discussion: https://www.postgresql.org/message-id/b9e3167f-f84b-7aa4-5738-be578a4db924%40iki.fi Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6c5576075b0f93f2235ac8a82290fe3b6e82300d Modified Files -------------- .../euc_tw_and_big5/euc_tw_and_big5.c | 144 +++++++++++++++++++-- 1 file changed, 134 insertions(+), 10 deletions(-)
В списке pgsql-committers по дате отправления: