[ 
https://issues.apache.org/jira/browse/DERBY-4746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tiago R. Espinha updated DERBY-4746:
------------------------------------

    Attachment: DERBY-4746.diff

This patch is a small incremental patch on what has been done for DERBY-728 to 
accommodate the server implementation. It does not yet insert any switch to the 
UTF8 encoding. Following is a walkthrough the changes:

- DDMWriter.java - When writing a scalar string, getting the length() off a 
string is no longer correct. When using EBCDIC this worked as ASCII characters 
in Java Strings take just 1 byte. However, what we require is the byte length 
and this differs based on the current ccsidManager (EbcdicCcsidManager 
maintains the old behavior).

- CcsidManager.java - Added two constants that represent the manager level for 
each of the CCSIDs. Note that our current implementation has EBCDIC at level 0, 
where as the specification mentions that it should be at level 500. I'm 
ignoring this for now as it doesn't interfere with the implementation (I check 
whether the level is 1208, if it isn't then it is EBCDIC) but we might want to 
fix this in the future.

The CcsidManager also gets a new abstract method called getByteLength(String 
str) that takes a String and returns the byte length of that String, using the 
method specified by each CCSID manager.

- Utf8CcsidManager.java - Converting to a Java String from bytes now has a 
different behavior. After experimenting with the protocol tests I've noticed 
that the offset and numToConvert are given in bytes and not characters.

> (Server) Implement UTF8 support on DRDA
> ---------------------------------------
>
>                 Key: DERBY-4746
>                 URL: https://issues.apache.org/jira/browse/DERBY-4746
>             Project: Derby
>          Issue Type: Sub-task
>    Affects Versions: 10.7.0.0
>            Reporter: Tiago R. Espinha
>            Assignee: Tiago R. Espinha
>         Attachments: DERBY-4746.diff
>
>
> I'm branching out this issue into server and client changes. Since the 
> changes are incremental and small, DERBY-728 would soon become confusing if 
> it had to bear the patches for both server and client.
> For future reference, some patches have actually been applied in DERBY-728. 
> These **ARE** also required for the server implementation.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to