Vietnamese Unicode

(7 posts) (2 voices)

Tags:

No tags yet.

  1. vannc, Member

    Dear Team!

    I have an issue with Unicode in the procedure and the names of report parameters. Could you help me?

    - SET @note = 'Ghi chú: Đơn vị tiền tệ: ' + @currencyType + '. Định dạng giá: ' + @priceFormat;
    SELECT 'dbr.text', @note;
    => show: Ghi chú: Ðon v? ti?n t?: VND. Ð?nh d?ng giá: One

    Report parameter name: Bộ phận
    => show: B? ph?n

    Thanks team!

  2. myDBR Team, Key Master

    Looks like a wrong character set/collation. Do you create the procedures in myDBR or using another application?

    What is the output if you put following commands in a report?


    show variables like '%CHAR%';
    show variables like '%COLLATION%';

    --
    myDBR Team

  3. vannc, Member

    Yes, I create the procedures in myDBR. Do I need to put the command in the SQL editor?

    Please see the picture in this link.
    https://drive.google.com/file/d/15j7TAYEC_a1UO_PmllcpQ9gRtnKXcUlN/view?usp=sharing

  4. myDBR Team, Key Master

    You are using SQL Server, so ignore the previous request.

    First, run the updater to make sure you are using the latest build.

    Then add following line to user/defaults.php:

    $mydbr_defaults['db_connection']['sqlsrv_use_utf8_string'] = true;

    In the procedure, make sure the @note and the characted parameters are declared as NCHAR(length) or NVARCHAR(length) as they can hold the Unicode charactres.

    When you assign a string to a variable inside a procedure, use the N-prefix in the string so SQL Server will treat the string as an Unicode string:

    SET @note = N'Ghi chú: Đơn vị tiền tệ: ' + @currencyType + '. Định dạng giá: ' + @priceFormat;

    --
    myDBR Team

  5. vannc, Member

    Thank you, team. Regarding the line 'SET @note = N'Note: Currency Unit: ' + @currencyType + '. Price Format: ' + @priceFormat', it is now working. However, the edit report -> parameter name 'Bộ phận' is still error unicode. Do I need to update the user/defaults.php file? Is this located within settings -> Server side files?

  6. myDBR Team, Key Master

    Yes,
    choose then Admin tools -> Server side files -> defaults.php and add the line there and save the file.

    --
    myDBR Team

  7. vannc, Member

    Thanks team!
    Best regards:
    Vannc


Reply

You must log in to post.