Sparx Systems Forum

Enterprise Architect => Bugs and Issues => Topic started by: Uffe on February 05, 2020, 10:56:59 pm

Title: Unicode characters when selecting Note column
Post by: Uffe on February 05, 2020, 10:56:59 pm
Hi all,


I've got a problem with a doc template which uses a custom SQL query to output data from t_object.Note.

Non-English characters in this column are not output as characters in the document, but as character codes (eg É instead of É).
Selecting from the t_object.Name column does not cause this problem. In the schema, t_object.Name is an nvarchar(255) and t_object.Note is an nvarchar(max).

I get the exact same result if I run the query through EA's SQL scratch pad: it works with Name, but not with Note.

There is no formatting in the Note, just regular text.

I'm in a SQL Server repository, using client 15.0.1512 and in the XML Specifications section of my client preferences, the Code Page is set to windows-1252.

What's going on?

More to the point, how do I get it to work?


/Uffe
Title: Re: Unicode characters when selecting Note column
Post by: Geert Bellekens on February 05, 2020, 11:19:21 pm
You have to tell EA it's formatted text.

In your (SQL Server) query do

Select o.Note as [Description-Formatted] from t_object o

In the template use {Description.Formatted}

Geert
Title: Re: Unicode characters when selecting Note column
Post by: Uffe on February 05, 2020, 11:51:47 pm
You have to tell EA it's formatted text.

It isn't formatted. It's regular, non-formatted text.
Title: Re: Unicode characters when selecting Note column
Post by: Uffe on February 05, 2020, 11:58:57 pm
... but the Formatted hack works.

Thanks Geert, and I guess we can add plain text to the list of things EA doesn't do very well...

/U
Title: Re: Unicode characters when selecting Note column
Post by: Geert Bellekens on February 06, 2020, 12:29:37 am
Since version 15 they started to xml-escape special characters in the notes fields.

So if you now use a notes field from SQL in documents (or searches, or...) you have to treat it as it would contain formatted text.

Geert