问题
Possible Duplicate:
Parsing UTF8 encoded data from a Web Service
I've written small web service which inserts data to the DB.
It takes parameter "comment":
CreateBuy(DateTime date, String cardNumber, Decimal amount, String comment)
{
...
}
It works fine with latin letters, but when I try to pass value of comment = "Продукт1" it passes to the stored procedure value @comment = '?YN€????N???N‚1' instead of 'Продукт1'.
How can it be resolved?
回答1:
Use localization parameters for this string. To avoid such problems, working both with english and russian better use Utf-8 encoding.
来源:https://stackoverflow.com/questions/10562166/cyrillic-letters-are-incorrectly-encoded-in-the-c-sharp-web-service