|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
about BOMshi, Does anyone find the way to run the utf-8 formated SQL scripts which with BOMs by Ant now? Thanks. -------------------------------------------------------------------------------------------------------- [sql] Failed to execute: ??CREATE TABLE -------------------------------------------------------------------------------------------------------- creatxr _________________________________________________________________ 隨身的 Windows Live Messenger 和 Hotmail,不限時地掌握資訊盡在指間 — Windows Live for Mobile http://3c.msn.com.tw/mobile/ |
|
|
Re: about BOMsI can't really answer this one, but what exactly causes you to assume that
it is due to the presence of a BOM in the SQL? Have you tested by removing and running it? If not then you should probably send the actual SQL that is generated because it seems to me that it would be more likely to be the cause? Best Regards, Bryan Rasmussen 2009/6/16 China Creatxr <creatxr@...> > > > > > hi, > Does anyone find the way to run the utf-8 formated SQL scripts which with > BOMs by Ant now? > Thanks. > > -------------------------------------------------------------------------------------------------------- > [sql] Failed to execute: ??CREATE TABLE > > -------------------------------------------------------------------------------------------------------- > > creatxr > > > _________________________________________________________________ > 隨身的 Windows Live Messenger 和 Hotmail,不限時地掌握資訊盡在指間 — Windows Live for Mobile > http://3c.msn.com.tw/mobile/ > |
|
|
Re: about BOMsChina Creatxr schrieb am 16.06.2009 um 14:27:37 (+0000):
> Does anyone find the way to run the utf-8 formated SQL scripts which > with BOMs by Ant now? Thanks. The <sql> task has an @encoding attribute. Set sql/@encoding = 'UTF-8' and see if that helps, which it should do. Michael Ludwig --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: about BOMsPlease be aware that this is a long standing problem.
Byte ordering is needed for utf-16 and 32, and there is a byteordering code for that at the start of the file. For utf-8 byte ordering is not required, however the utf-8 standard is a little vague as to whether it is not allowed. .... this means that some people allow it and some do not. Microsoft uses the BOM to indicate that a text file is encoded as UTF-8 rather then the current default platform encoding. Sun does not allow the BOM and it's UTF-8 reader converts it into a ?. This is what the ant sql task sees. At one stage during the development of java 1.6, the UTF-8 reader was changed to ignore the BOM code, but this was reverted as it caused some backward comparability problems. Note that nearly all XML parsers in java do not use the sun UTF-8 reader, and handle the (pointless) BOM code correctly. Peter On Thu, Jun 18, 2009 at 11:53 PM, Michael Ludwig<milu71@...> wrote: > China Creatxr schrieb am 16.06.2009 um 14:27:37 (+0000): >> Does anyone find the way to run the utf-8 formated SQL scripts which >> with BOMs by Ant now? Thanks. > > The <sql> task has an @encoding attribute. Set sql/@encoding = 'UTF-8' > and see if that helps, which it should do. > > Michael Ludwig > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@... > For additional commands, e-mail: user-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
|
|
Re: about BOMsPeter Reilly schrieb am 19.06.2009 um 08:05:50 (+0100):
> Please be aware that this is a long standing problem. > Sun does not allow the BOM and it's UTF-8 reader > converts it into a ?. Thanks for bringing this Sun Java bug to my attention. I wasn't aware of this handicap. > This is what the ant sql task sees. Okay. I thought that by indicating the encoding, the task would dispatch reading to a suitable facility. > At one stage during the development of java 1.6, the > UTF-8 reader was changed to ignore the BOM code, > but this was reverted as it caused some backward > comparability problems. I've seen "backward compatibility" being defined as "knowingly repeating other people's mistakes". Well, there are pros and cons. > Note that nearly all XML parsers in java do not use > the sun UTF-8 reader, and handle the (pointless) > BOM code correctly. That's also my experience. Michael Ludwig --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@... For additional commands, e-mail: user-help@... |
| Free embeddable forum powered by Nabble | Forum Help |