Giter Club home page Giter Club logo

Comments (11)

superkhau avatar superkhau commented on July 18, 2024

What database/conector are you using? Is your database set up to recognize UTF-8?

from loopback-connector-mssql.

ahmed-abdulmoniem avatar ahmed-abdulmoniem commented on July 18, 2024

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.

superkhau avatar superkhau commented on July 18, 2024

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.

ahmed-abdulmoniem avatar ahmed-abdulmoniem commented on July 18, 2024

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.

ahmed-abdulmoniem avatar ahmed-abdulmoniem commented on July 18, 2024

@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.

raymondfeng avatar raymondfeng commented on July 18, 2024

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.

ahmed-abdulmoniem avatar ahmed-abdulmoniem commented on July 18, 2024

Yeah sure

from loopback-connector-mssql.

ahmed-abdulmoniem avatar ahmed-abdulmoniem commented on July 18, 2024

@raymondfeng Here it is #52

from loopback-connector-mssql.

superkhau avatar superkhau commented on July 18, 2024

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.

ahmed-abdulmoniem avatar ahmed-abdulmoniem commented on July 18, 2024

@superkhau Thank you :)

from loopback-connector-mssql.

superkhau avatar superkhau commented on July 18, 2024

Resolved via #52.

from loopback-connector-mssql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.