Skip to Content.
Sympa Menu

freetds - Re: [freetds] unicode

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT freetds.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] unicode
  • Date: Tue, 29 Jul 2008 23:41:08 -0400

Murray, Laura (US) wrote:
>
> "Please try to change FreeTDS's client char set setting from UTF-8 to
> EUCJP-MS as below.
>
> 1) add code EUCJP-MS to 'src/tds/encodings.h'.
>
> 2) change strings buffer from 256 to 100000 in 'src/tds/write.c'.
>
> 3) modify freetds.conf as such: client charset=EUCJP-MS
>
>
> I implemented 2) and 3) but for 1) did not know where to put the code in
> the file. Also, just wanted to know if you approve of this approach, in
> general. If so.....after these modifications, do I need to redo the
> freetds "make" and "make install"?

Hi Laura,

If these changes are necessary, yours would be the first case, and I'd
like to understand why. Adding code to encodings.h isn't baby simple: the
file is generated because there are interlocking parts. I suspect it
would be better to add the name -- assuming that's required at all -- to
alternative_character_sets.h and regenerate encodings.h. And, yes, it
would mean rebuilding and re-installing FreeTDS.

But how do we know the solution lies in that direction? To answer that,
we'd have to know more about your environment. To wit:

1. OS and version
2. iconv library implementation
3. encoding of data coming from the Oracle server
4. encoding of single-byte data on the Microsoft server
5. the gadget that's using FreeTDS (maybe)

I would also pursue getting a TDSDUMP log.

I don't see how #2 will change anything. Whether the buffer is 10 bytes
or 10 million, the data are all converted and written.

#1 and #3 are related. They're based on the premise that FreeTDS is not
#recognizing the encoding being used by the "client" i.e. the Oracle
#server. That could be true but, as I said, I'm skeptical.

Can you log onto the gateway machine and use tsql to insert Japanese
characters correctly? That would demonstrate none of the above changes
are needed.

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page