Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 61475 invoked from network); 26 Oct 2007 10:31:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2007 10:31:38 -0000 Received: (qmail 31049 invoked by uid 500); 26 Oct 2007 10:30:34 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 31022 invoked by uid 500); 26 Oct 2007 10:30:34 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 31002 invoked by uid 99); 26 Oct 2007 10:30:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 03:30:33 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 10:30:37 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IlMSF-000682-AK for torque-dev@db.apache.org; Fri, 26 Oct 2007 03:30:15 -0700 Message-ID: <13424494.post@talk.nabble.com> Date: Fri, 26 Oct 2007 03:30:15 -0700 (PDT) From: SheraX To: torque-dev@db.apache.org Subject: RE: Inserting Special Characters in Oracle using TORQUE. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: sheraz.jamshed@redmath.com References: <13421479.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Thanks alot for the reply Thomas. Regarding your solution a) how can I check the length for the character set that Tourque Uses?=20 For solution b) how can I change the db character set? Can we change the charset of db from any torque configuration files ? Thanks in advance... Sheraz Jamshed Thomas Fischer-11 wrote: >=20 > There are fixed length character sets (each character uses the same amoun= t > of space, like ISO-8859-1 (1 byte) or unicode(2 bytes)) and variable > length > character sets where some characters neen more space than others (e.g. > utf-8 where characters can occupy 1-3 bytes). It seems that java and the > db > use different character sets. The database or its driver takes care of th= e > conversion, which can lead to a longer byte sequence in the db. >=20 > The solution would be a) to make the length check in the charset of the d= b > or b) use the same charset in the db as in the web application. >=20 > Thomas >=20 > SheraX schrieb am 26.10.2007 08:21:17: >=20 >> >> Hellow everyone, >> >> I am getting a strange problem. I am developing a webapplication in IBM >> Rational Software Development Platform Version: 6.0.1 Using Torque > Version >> 3.0.2. >> I need to insert special characters like (ABCDEFG1234=C3=91=C3=A3=C3=A4= =C3=A5=C3=A6=C3=A7=C3=A8=C3=A9=C3=AA=C3=AA=D7=94=D0=A6=D0=91=D0=8C) into > an >> Oracle(10g) Table Column of type VARCHAR2(4000 BYTE). >> >> The Charset of web application is default IS0-8859. The value is saved i= n >> database and retrieved and displayed fine. But the problem arises on > boundry >> value checks. >> Now the string containing special characters of higher decimal ASCII > value >> occupy more bytes then lower ASCII value. So the length of the string is >> different then the number of characters input by user. >> Before inserting into database I validate the input value in the form to > be >> less then 4000 bytes (using myValue.length() ). It indeed shows value > less >> then 4000 like in one case the length of the string is 3680. But when > torque >> tries to insert the value in database the ORA Exception is encountered >> >> "org.apache.torque.TorqueException: Data size bigger than max size for > this >> type: 4245" >> >> >> I am not able to understand why string length changes when torque tries > to >> insert it into the database. >> >> Awaiting Response >> >> >> Regards >> >> SheraX >> >> >> -- >> View this message in context: http://www.nabble.com/Inserting-Special- >> Characters-in-Oracle-using-TORQUE.-tf4695403.html#a13421479 >> Sent from the Apache DB - Torque Dev mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org >> For additional commands, e-mail: torque-dev-help@db.apache.org >> >=20 --=20 View this message in context: http://www.nabble.com/Inserting-Special-Chara= cters-in-Oracle-using-TORQUE.-tf4695403.html#a13424494 Sent from the Apache DB - Torque Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org