stephenwilde
asked on
IDN domain saving in SQL database
Hi
Have MS SQL database for domain names but recently been getting idn domains and cannot save them as text versions only punny version - in sql do I need a special feild type?
e.g of a domain in punny is xn--48j.net and in text U.net (will not save as this!)
Rgds
stephen
Have MS SQL database for domain names but recently been getting idn domains and cannot save them as text versions only punny version - in sql do I need a special feild type?
e.g of a domain in punny is xn--48j.net and in text U.net (will not save as this!)
Rgds
stephen
ASKER
Hi
Thanks for idea but it did not seem to work fully idn punny is xn--48j.net which translates in to U.net
but when saved in nvarchar it was shown as square box .net in sql but when copied and pasted contents to here it was U.net again - so it may be limitation of sql manager displaying values?
Rgds
stephen
Thanks for idea but it did not seem to work fully idn punny is xn--48j.net which translates in to U.net
but when saved in nvarchar it was shown as square box .net in sql but when copied and pasted contents to here it was U.net again - so it may be limitation of sql manager displaying values?
Rgds
stephen
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much
Welcome..
If I am correct idn domains refers to International domains, right..
To save International characters in SQL Server, you have to use / store those values into nchar/nvarchar/ntext datatype columns instead of char/varchar/text columns..
Say if 'abc' is your international character, then inserting into a nchar/nvarchar/ntext column by prefixing N like N'abc' would retain the international characters..
Else those international characters would be ripped off..
Note: text and ntext are going to be deprecated in later versions and hence go for nchar/ nvarchar