1 Apr 2005 08:48
Re: I18n and Oracle9
Martin Kalén <mkalen <at> apache.org>
2005-04-01 06:48:44 GMT
2005-04-01 06:48:44 GMT
Vadim Gritsenko wrote: > As you might know, in default Oracle install, > > VALUE VARCHAR(20) > > actually means 20 *bytes*, not 20 characters. So for i18n applications > this means that actual limit is closer to 10 or less characters - > depending on encoding. Since Oracle9 it's possible to specify that when > you create a character field of specified length you actually *do* mean > that this length is in characters, not bytes! New syntax is: > > VALUE VARCHAR(20 CHAR) > > Alternatively, one can use NVARCHAR, which is (AFAIU) will always use > UTF-16 encoding and length is always in characters, not bytes. > > Questions, > > * Is there a way to instruct torque to create schema using above syntax? To my knowledge, Torque does not have switchable syntax like this. You should really ask Thomas Fisher and the others over at torque-dev or torque-user, since I'm not a Torque expert. > * Is there a way to instruct torque to use nvarchar instead of varchar? As we've seen in OJB 1.0.2, it's possible to patch Torque templates to accomplish this. But that's a really ugly solution IMO and just a temporary work-around for the outdated Torque in 1.0.x branch.(Continue reading)
Tom
RSS Feed