Comments (11)
What database/conector are you using? Is your database set up to recognize UTF-8?
from loopback-connector-mssql.
My database is SQL Server 2012 using this connector "loopback-connector-mssql": "^2.2.0"
.
How to setup the database to recognize UTF-8?
from loopback-connector-mssql.
How to setup the database to recognize UTF-8?
This is not LoopBack specific, you will need to Google how to do it for your specific database. If you need direct support, we offer subscription plans. See https://strongloop.com/node-js/subscription-plans/. Closing for now, feel free to reopen once you confirm it's an actual LoopBack issue.
from loopback-connector-mssql.
So you think it is not loopback issue? I wasted 3 hours until now on how to configure the SQL Server to support UTF8 but it doesn't support that. I think the connector should convert data to something appropriate to be saved correctly in Arabic in database.
from loopback-connector-mssql.
@superkhau @raymondfeng
I have changed this line
https://github.com/strongloop/loopback-connector-mssql/blob/master/lib/mssql.js#L266
to:
return "N'" + val + "'";
This adds support to unicode and Arabic now is inserted and working well.
from loopback-connector-mssql.
Based on https://support.microsoft.com/en-us/kb/239530, your proposed change looks good to me. Do you want to submit a patch?
from loopback-connector-mssql.
Yeah sure
from loopback-connector-mssql.
@raymondfeng Here it is #52
from loopback-connector-mssql.
So you think it is not loopback issue?
I wasn't sure if it was yet, but I wanted you to confirm the database side before reopening the issue, which @raymondfeng has already done.
I wasted 3 hours until now on how to configure the SQL Server to support UTF8 but it doesn't support that. I think the connector should convert data to something appropriate to be saved correctly in Arabic in database.
Thanks for researching it and coming to the conclusion that it was Loopback related. As we look at a lot of issues, we appreciate that issues are confirmed before reporting. I will take a look at the patch and get it merged ASAP.
from loopback-connector-mssql.
@superkhau Thank you :)
from loopback-connector-mssql.
Resolved via #52.
from loopback-connector-mssql.
Related Issues (20)
- tedious type deprecation messages in console HOT 2
- query the table using rowversion HOT 2
- AutoUpdate needs to have order when executing index related operations HOT 2
- Loopback 4 relations compatibility HOT 15
- applyPagination is missing the ORDER BY clause when supportsOffsetFetch HOT 2
- loopback 4 model options not working for mssql HOT 5
- MsSQL not exported in loopback-connector-mssql HOT 7
- Incorrect Table Relations Discovery HOT 5
- Relations not working in loopback 4 using mysql database How to solve it HOT 3
- Run shared tests from both v3 and v4 of juggler
- Transaction not working in Loopback 4. HOT 2
- New release? HOT 2
- Loopback 4 Transaction returning undefined. HOT 8
- EPERM on version 3.7.0
- EPERM in version 3.7.0, error related to adal node package HOT 22
- executeSql should return mssql results HOT 5
- Loopback 4 can not parsing javascript Date Object to native SQL statement which require Date parameter HOT 1
- migrate script not supports custom column names
- Having CVE in the current version. can you please update to latest version of mssql and loopback-connector HOT 1
- Like operator not working when trying to fetch stringify array of objects or object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loopback-connector-mssql.