DECLARE @XML_VC_8 XML;
DECLARE @string NVARCHAR(MAX);
DECLARE @PreFix NVACHAR(MAX);
SET @PreFix =\'N\'
SET @XML_VC_8 = \'
removing the N variable
and changing encoding to utf-16
, this should get your characters
Declare @XML_VC_8 XML;
Declare @string nvarchar(max);
set @XML_VC_8 = N'<?xml version="1.0" encoding="utf-16"?><test>fdff مرحبا</test>';
set @string=Convert(nvarchar(max),@XML_VC_8);
print @string
These work fine!
DECLARE @XML_VC_8 XML;
SET @XML_VC_8 = N'<?xml version="1.0" encoding="utf-16"?><test>fdff مرحبا</test>';
SELECT @XML_VC_8