Hello, I have a problem with displaying of German umlaut-symbols after making a GET-request to XData which uses TMS-Aurelius, which accesses InterBase. I created a test endpoint (XData deployed in Google's Ubuntu VM) in order to demonstrate the problem.
Type definitions:
[Entity]
[Table('ADRESSEN')]
[Sequence('ADRESSEN_KENNZIFFER_GEN')]
[Id('FKENNZIFFER', TIdGenerator.IdentityOrSequence)]
TADRESSEN = class
private
...
[Column('NAME3', [ ], 30)]
FNAME3: Nullable<string>;
...
public
...
property NAME3: Nullable<string> read FNAME3 write FNAME3;
...
end;
Endpoint registration:
[Authorize]
[HttpGet, Route('test')]
function Test: string;
Endpoint implementation:
function TAdressenService.Test: string;
var
Manager: TObjectManager;
Id: Integer;
Adressen: TAdressen;
begin
Id := 10275;
Manager := TXDataOperationContext.Current.GetManager;
Result := Manager.Find<TAdressen>(Id).NAME3;
end;
And after I do the request through Postman or web-based frontend, I get the following:
{
"value": "???????"
}
instead of:
{
"value": "ÄäÖöÜüß"
}
I saw similar problems in the support center, however, here's how my case is different:
- In the InterBase, 'NAME3' column of table 'ADRESSEN' has character set 'NONE'. And if I try to create a table with any other character set (WIN1252, UTF8, etc.), and write german umlauts inside, it results in an error, meaning that 'NONE' character set is the only way to go.
- In the Delphi IDE in the connection editor, I can also change the character set from 'NONE' to any other, but it also results in some kind of incompatibility error when calling the endpoint. Moreover, using SQL-script tab in the connection editor, I can execute the command which retrieves that 'NAME3' value, and everything is executed correctly, with umlauts displaying, which makes me think that the problem lies in how TMSAurelius is handling it.
- I tried using this line of code in the initialization of the project: TGlobalConfigs.GetInstance.MapStringToNationalChar := True;
However, it doesn't seem to help even if I put it directly before the endpoint execution code.
What else I might be missing here?