Ruby 1.9.1 and later tracks the encoding of every string, so all strings must be declared with an encoding that matches their actual content.
Without this patch the SAP strings are marked as ASCII-8BIT and are displaying incorrectly.
This is fixed by marking the SAP returned strings as UTF-8 strings.
In passing I also fixed a missing include that causes the gem installation build of the C extension to fail.
Tested in with ruby 1.9.3-p551.
Ruby 1.9.1 and later tracks the encoding of every string, so all strings must be declared with an encoding that matches their actual content. Without this patch the SAP strings are marked as ASCII-8BIT and are displaying incorrectly. This is fixed by marking the SAP returned strings as UTF-8 strings.
In passing I also fixed a missing include that causes the gem installation build of the C extension to fail. Tested in with ruby 1.9.3-p551.