cancel
Showing results for 
Search instead for 
Did you mean: 

UNLOAD statement problem in SA12

2,894

We are upgarde our product from SA10 to SA12 12.0.1 (Linux - EBF 3311; Windows EBF 3324). We found out that UNLOAD statement add to first line of file - 3(three) hex character - xEF, xBB, xBF. Example

UNLOAD SELECT * FROM DEVICE TO 'c:\\default_db\\temp\\cfg_dev_4.txt'

first line

1,1,0,'AS-DEF','allot.com','AS_DEF','Application Server/Collectors'

instead of

1,1,0,'AS-DEF','allot.com','AS_DEF','Application Server/Collectors'

It doesn't make problem if you want to use this file with LOAD statement, but in our case we make additional processing with our application and it make problem, with SA10 it had working properly. This problem appears in OS Windows and Linux.

Accepted Solutions (0)

Answers (1)

Answers (1)

johnsmirnios
Employee
Employee

See http://dcx.sybase.com/index.html#1201/en/dbreference/unload-statement.html*d5e63698

"BYTE ORDER MARK clause Use this clause to specify whether a byte order mark (BOM) should be written. By default, this option is ON, provided the destination for the unload is a local or client file. When the BYTE ORDER MARK option is ON and the ENCODING is UTF-8 or UTF-16, then a BOM is written. If BYTE ORDER MARK is OFF, a BOM is not unloaded. "

Note that although byte ordering in UTF8 is a meaningless concept, many text editors & text processing systems allow a UTF8 encoded BOM character at the beginning of the text so that the encoding of the data can easily be detected as UTF8.

0 Kudos

Thanks, it help to us fix problem

VolkerBarth
Contributor

If so, it's good practise to accept this answer.

Here's how to do so:)