Unicode and ASCII vs. Text fields
Hi everyone
We found an interesting issue with our tables:
When we store Unicode characters in a ASCII field (nvarchar, length: 50) it works fine. If the filed is a Text field (nvarchar, length 500) it does not work. The Unicode character gets converted to ????
Is this a (known?) issue/bug (or a feature in disguise)?
Re: Unicode and ASCII vs. Text fields
Interesting: Adding Unicode manually into the SQL table works. And it displays correctly in the browser. As soon as I change it in the DataFlex WebApp it replaces the Unicode characters with ?.
I'm a bit puzzled by this... I just tried on another developer machine and it seems to work there.
1 Attachment(s)
Re: Unicode and ASCII vs. Text fields
Raphael,
If it does work on a different machine check the following:
[LIST][*]Is the "beta" flag in regional options (see image) unchecked?[*]Does the "failing" computer use the same MSSQL Client driver as the correct working machine?[/LIST]
Re: Unicode and ASCII vs. Text fields
Raphael,
What's the control?
Is this against a cWebForm or a cWebEdit?
If it is a cWebForm, does it help if you change the control to a cWebEdit?
--
Wil
Re: Unicode and ASCII vs. Text fields
@Vincent: The region setting is the same (unchecked) on both machines. The MSSQL Client driver is the same version as well.
@Wil: It happens in cWebEdits, cWebForm and in cWebColumns (I did not try any other controls).
I'm going to delete my SQL Database and "start from scratch" (eg. load a working backup and do the migrations to Unicode again on my machine). Let's see if it is something I accidentally changed in the database settings.
If that does not work: I'll restore a backup from the other machine locally and see if that helps.
As it seems to work on the other development machine, I assume it's something wrong on my machine. I tested accessing WebApps hosted on other machines and they work fine. I assume something is wrong with my installation.
Re: Unicode and ASCII vs. Text fields
Is the df_table_character_format properly set to ANSI for this table?
Re: Unicode and ASCII vs. Text fields
Yes, everything is set to ANSI.
I figured it out. Best mistake ever ;)
Alright: I deactivated the cache files in the database driver (since its annoying to manually delete them when someone else changes the database and puts the changes into the repository).
BUT: I only deactivated the cache files in the 64bit version of the driver config. And since we can't update to 64bit (because of the security library which does not support that one WIN32-/CNG-API call) I switched back to 32 bit... and completely forgot to delete the CCH-files (or change the other config file as well).
And since I was sure I deactivated the CCH files I did not check nor delete them.
Interesting that it only affected the Text fields and not the ASCII ones...
Sorry for wasting your time and thanks for the valuable input.
Re: Unicode and ASCII vs. Text fields
Re: "[COLOR=#333333][I]Best mistake ever[/I]" - that's a high bar to cross around here, dude! [/COLOR];)
Mike
Re: Unicode and ASCII vs. Text fields
Re: Unicode and ASCII vs. Text fields