Link to home
Start Free TrialLog in
Avatar of stephenwilde
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
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

>> 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?

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
Avatar of stephenwilde
stephenwilde

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

 
 
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks very much
Welcome..