Subject Re: [Firebird-Java] Re: Which charset to use?
Author Roman Rokytskyy
> Just to make sure, if i have a text file with a SQL statement encoded
> in ISO-8859-1 and i read it into a java String using:
>
> BufferedReader r = new BufferedReader(fileStream, "ISO-8859-1"));
> String sql = reader.readLine();
>
> The file content will be converted to UTF-16 when stored in the
> String, and when i execute this statement in the database using:

Correct.

> ...
> properties.put("charSet", "UTF-8");
> DriverManager.getConnection(url,
> properties).createStatement().execute(sql);
>
>
> OR
>
> ...
> properties.put("charSet", "ISO-8859-1");
> DriverManager.getConnection(url,
> properties).createStatement().execute(sql);
>
> The content stored in my database will be correct, so i presume
> JayBird will convert the statement String from UTF-16 to the
> connection charset before sending it to the server.

Yes.

Roman