db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fischer (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TORQUE-49) Encoding will not be used in insert-sql if it is used in generation task
Date Mon, 21 Aug 2006 21:21:15 GMT
    [ http://issues.apache.org/jira/browse/TORQUE-49?page=comments#action_12429539 ] 
Thomas Fischer commented on TORQUE-49:

According to my researches, the problem is the following
- when reading in the schema.xml, Torque ignores the xml schema encoding but uses the system
default encoding.
- when writing the sql script, Torque again uses the system default encoding.
- when reading the sql script, torque again uses the system default encoding.
So what happens i that torque reads the schema file wrongly, but outputs the wrongly read
characters again in the same encoding, wehich in the above combination reproduces the encoding
in xml. For example, a german umlaut is a two-byte character in UFT-8, is read as thw iso-8859-1
characters, output as the same two iso-8859-1 characters, and thus gives the smae byte sequence
as the original utf-8-encoded character. When executing the sql file, the wrong encoding is
"detected" and it crashes.
The solution should be to respect the schema.xml encoding when reading in the xml file.

> Encoding will not be used in insert-sql if it is used in generation task
> ------------------------------------------------------------------------
>                 Key: TORQUE-49
>                 URL: http://issues.apache.org/jira/browse/TORQUE-49
>             Project: Torque
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 3.2
>            Reporter: Thoralf Rickert
>            Priority: Trivial
> My schema.xml is encoded in UTF-8 and torque generates a SQL file in UTF-8. But when
I run "insert-sql" the TorqueSQLExec task decodes the file with the system encoding because
it doesn't know that the SQL file was encoded in UTF-8.
> My current solution is to set the attribute encoding="UTF-8" in the "torque-sql-exec"
task call in my build-torque.xml.
> But I think torque should know the encoding of the files that it generates. It could
be set (for example) in the sqldb.map file or by using special filename extension like .utf8.sql

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message