Garbage data while inserting data with special characters in SQL Server 2012 using Perl

I have an XML file with data in multiple languages (eg. - Russian, Japanese, Chinese, English). This XML is created on Linux platform and it has passed xmllint checks.

Now, I am reading this data from XML file and inserting into SQL Server 2012 on Windows 7 platform (XML also present on Windows). But I am getting ???? as a value in fields. This is happening for some of the cases like all the sentence in other language.

But, if any sentence having some special characters it's working fine.

I am using function

$row_value = decode("utf-8",$row_value);

Answers


use Encode;
require Encode::Detect;
my $utf8 = decode("Detect", $data);

Try this for decode data...


Need Your Help

Swift NSUserDefaults not geting set

ios swift nsuserdefaults

I don't like to ask simple questions but today I am stumped. All I need to do is see if there is a value set in NSUserdefaults on app launch. If it is not then add a value. That's it. Every time I ...

Flash embedded in HTML doesn't appear in Chrome

flash google-chrome

When i embed a flash video in HTML it works in IE and in Firefox but not in chrome.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.