0

In process maker, when I query from SQL Server I get ??? as a result.

I try change database collation to Arabic_CI_AI but does not work and I try to use utf8_encode and utf8_decode in process maker but this does not work, too.

I don't know what am I doing.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 3
    **Most likely** your datatype is `VARCHAR(n)` and that doesn't work for languages like Arabic, Hebrew, Cyrillic, Japanese, Chinese etc. - you need to use `NVARCHAR(n)` to get **Unicode** (2-byte-per-character) strings, and if you ever specify a **string literal** in your T-SQL code, you **must** prefix it with a `N'...'` to indicate a Unicode string literal. – marc_s Aug 19 '17 at 09:35
  • my datatype is NVARCHAR and my SQL code is select [DepartmentID], [Name] from [webCopy].[HumanResources].[Department] – davod saraei Aug 19 '17 at 09:59
  • Please post DDL,DML Of the tables involved .Having this info helps others to quickly repro your issue and asnwer better.Below is some sample which might help you understand. **--sample data** `create table t1 ( id int ) insert into t1 values (1), (2), (1) ` **my current query/what i have tried:** `select id,count(*) as cnt from t1 group by id` **my current result:** `id cnt 1 2 2 1` **my expected result:** `id cnt 1 2 2 1 1 2` – TheGameiswar Aug 19 '17 at 14:25
  • my current query `use [webCopy] go select [DepartmentID], [Name] from [webCopy].[HumanResources].[Department] where [DepartmentID] in ( select [DepartmentID] from [webCopy].[HumanResources].[EmployeePosition] where [EmployeeID] = (select [UserManagementID] from [webCopy].[Security].[UserManagement] where [username] = '94073599') );` and my expected result is `7210268 | کارشناس IT فهامه` but I get `7210268 | ?????` – davod saraei Aug 20 '17 at 10:56

0 Answers0