Skip to content

Function "UploadIntoStream()" does ignore Encoding Options. So german special Characters cant get displayed in BC 15 SAAS #5403

@Jbb93

Description

@Jbb93

Describe the bug
If i use the AL-function UploadintoStream() then the Encoding of the Instream gets ignored. This means i cant change the Encoding, so if I import a file with german special characters like ß,ä,ö... cant get displayed in any Buisness Central table. I have this problem in BC15 SAAS-System.

To Reproduce
Use the function UploadIntoStream() to upload an ANSI-File wich has german letters to a stream.
If you load the data from the stream to a table, then german special characters are shown as a "?".

Code Example:
tempblob.CreateInStream(FileInstream, TextEncoding::Windows);
UploadIntoStream('Please chose a .txt import file', ImportFolder, 'txt files (.txt)|.txt', ImportFile, FileInstream);
CSVBuffer.DeleteAll();
CSVBuffer.LoadDataFromStream(FileInstream, ';');
IF CSVBuffer.FindSet() then
repeat
if (CSVBuffer."Field No." = 2) then
ORVProtelCustomerImport.Init();
case CSVBuffer."Field No." of
2:
begin
ORVProtelCustomerImport."Customer No." := FORMAT(DeleteBadChars(CSVBuffer.Value), 20);
IF Cust.Get(ORVProtelCustomerImport."Customer No.") then
ORVProtelCustomerImport."Customer exists" := true
else
ORVProtelCustomerImport."Customer exists" := false;
end;
4:
ORVProtelCustomerImport.Name := Format(DeleteBadChars(CSVBuffer.Value), 100);
5:
ORVProtelCustomerImport."Name 2" := Format(DeleteBadChars(CSVBuffer.Value), 50);
...
After filling the Values, ORVProtelCustomerImport gets inserted.

Expected behavior
Special chars should be shown as the right char in Table ORVProtelCustomerImport and not as a "?"

Screenshots
1
2

Data:
Protel Debitoren.txt

5. Versions:

  • AL Language:
    4.0.191880
  • Business Central:
    Version: Platform 15.0.37395.0 + Application 15.0.36560.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions