| Thread overview | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 13, 2015 The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users. Now, the data comming from MsSql must convert by 'fromMBS' or 'toMBSz',it's not convenient to operate DataBase. Do you think a string that named 'Astring' which means 'ANSI' string is good for D? Thank you. | ||||
January 14, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On 1/14/2015 1:47 AM, FrankLike wrote: > The ANSI character set is very important for operating MSSQL, if no > conversion, will expand the scope of D users, that can attract more C# > users. Not likely. > > Now, the data comming from MsSql must convert by 'fromMBS' or > 'toMBSz',it's not convenient to operate DataBase. > > Do you think a string that named 'Astring' which means 'ANSI' string is > good for D? This has nothing to do with ANSI, and everything to do with multibyte character sets. Besides which, there always must be a to/from something when converting between D strings and C strings, no matter what format the C string is in. | |||
January 14, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On Tuesday, 13 January 2015 at 16:47:33 UTC, FrankLike wrote: > The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users. > > Now, the data comming from MsSql must convert by 'fromMBS' or 'toMBSz',it's not convenient to operate DataBase. > > Do you think a string that named 'Astring' which means 'ANSI' string is good for D? > > Thank you. If by ANSI you mean codepage-1252 we actually have that in the frequently overlooked std.encoding. http://dlang.org/library/std/encoding/windows1252_string.html http://dlang.org/library/std/encoding/EncodingSchemeWindows1252.html | |||
January 14, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Brad Anderson | On Wednesday, 14 January 2015 at 02:08:21 UTC, Brad Anderson wrote:
> On Tuesday, 13 January 2015 at 16:47:33 UTC, FrankLike wrote:
>> The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users.
>>
>> Now, the data comming from MsSql must convert by 'fromMBS' or 'toMBSz',it's not convenient to operate DataBase.
>>
>> Do you think a string that named 'Astring' which means 'ANSI' string is good for D?
>>
>> Thank you.
>
> If by ANSI you mean codepage-1252 we actually have that in the frequently overlooked std.encoding.
>
> http://dlang.org/library/std/encoding/windows1252_string.html
> http://dlang.org/library/std/encoding/EncodingSchemeWindows1252.html
Thank you.
I get data by arsd from MsSql,it can display string ok in cmd,but not work ok on gui.
| |||
January 14, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On Tuesday, 13 January 2015 at 16:47:33 UTC, FrankLike wrote:
> The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users.
MSSQL supports UCS2 (16 bit unicode) for nvarchar and you should be able to set the connection to UTF-8.
| |||
January 14, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Wednesday, 14 January 2015 at 13:44:39 UTC, Ola Fosheim Grøstad wrote:
> On Tuesday, 13 January 2015 at 16:47:33 UTC, FrankLike wrote:
>> The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users.
>
> MSSQL supports UCS2 (16 bit unicode) for nvarchar and you should be able to set the connection to UTF-8.
' set the connection to UTF-8'? MSSQL? How to do? But I only know it ok in mySql. Thank you.
| |||
January 14, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On Wednesday, 14 January 2015 at 15:37:20 UTC, FrankLike wrote: > On Wednesday, 14 January 2015 at 13:44:39 UTC, Ola Fosheim Grøstad wrote: >> On Tuesday, 13 January 2015 at 16:47:33 UTC, FrankLike wrote: >>> The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users. >> >> MSSQL supports UCS2 (16 bit unicode) for nvarchar and you should be able to set the connection to UTF-8. > > ' set the connection to UTF-8'? MSSQL? How to do? But I only know it ok in mySql. Thank you. Just search for it. https://www.google.no/?q=mssql%20connection%20utf-8 First hit: http://stackoverflow.com/questions/1322421/php-sql-server-how-to-set-charset-for-connection | |||
January 14, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Wednesday, 14 January 2015 at 15:56:14 UTC, Ola Fosheim Grøstad wrote:
> On Wednesday, 14 January 2015 at 15:37:20 UTC, FrankLike wrote:
>> On Wednesday, 14 January 2015 at 13:44:39 UTC, Ola Fosheim Grøstad wrote:
>>> On Tuesday, 13 January 2015 at 16:47:33 UTC, FrankLike wrote:
>>>> The ANSI character set is very important for operating MSSQL, if no conversion, will expand the scope of D users, that can attract more C# users.
>>>
>>> MSSQL supports UCS2 (16 bit unicode) for nvarchar and you should be able to set the connection to UTF-8.
>>
>> ' set the connection to UTF-8'? MSSQL? How to do? But I only know it ok in mySql. Thank you.
>
> Just search for it.
>
> https://www.google.no/?q=mssql%20connection%20utf-8
>
> First hit:
>
> http://stackoverflow.com/questions/1322421/php-sql-server-how-to-set-charset-for-connection
Not a good idea.
| |||
January 14, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to FrankLike | On Wednesday, 14 January 2015 at 16:44:35 UTC, FrankLike wrote:
> Not a good idea.
What is not a good idea? The default collation differs based on the OS settings AFAIK. In western countries it probably is ISO8859-1 (not a windows code page, but close). Unicode data is UCS2LE (little endian), but if you get the settings right the client library should allow you to use UTF-8.
| |||
January 15, 2015 Re: The ANSI character set is very important for operating MSSQL,if no conversion,will attract more C# users | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Ola Fosheim Grøstad | On Wednesday, 14 January 2015 at 17:19:42 UTC, Ola Fosheim Grøstad wrote:
> On Wednesday, 14 January 2015 at 16:44:35 UTC, FrankLike wrote:
>> Not a good idea.
>
> What is not a good idea? The default collation differs based on the OS settings AFAIK. In western countries it probably is ISO8859-1 (not a windows code page, but close). Unicode data is UCS2LE (little endian), but if you get the settings right the client library should allow you to use UTF-8.
The wstring displayed ok in cmd,but not ok in gui(must use the fromMBS fuction),so I want to test change the gui'control.d ,set text property is Tstring ,by verstion(ANSI),set text is wstring ,else ,set text is string.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply