Why there is difference while reading the “O'max” string from csv file using golang?












-1















I'm testing my code of importing a user record in the database. The code will running successfully and the user will import in the database but there is a problem while reading a string from the csv file. I'm using ubuntu making a csv file using software LibreOffice Calc. The files seems like this. When I import this records then it will insert the record but I can't do any booking with this user because the software says the customer is not valid because of the "O'max". But when I give the manually entry to the software with same details then it will not create any error. Can anyone tell me what is the actual problem that there is problem while reading the name from csv file or any other issue?. The frontend is on the Angular.



FrontEnd :- Angular



BackEnd:- Golang



Database :- Mongodb










share|improve this question




















  • 1





    Post the relevant part of your code so that others can try to reproduce the problem.

    – Gregory Higley
    Nov 15 '18 at 4:56











  • @GregoryHigley There is nothing special in code there is no validation in the code for this but in database it will do different entry for csv data it enters O’max and for manually entered data it will enter the string like O'max

    – msd
    Nov 15 '18 at 5:04













  • @GregoryHigley Can you tell me why it make a difference of '

    – msd
    Nov 15 '18 at 5:16











  • Not without seeing the code and the input data. Computers are deterministic. So there must be a difference of some kind between the two scenarios.

    – Gregory Higley
    Nov 16 '18 at 12:35
















-1















I'm testing my code of importing a user record in the database. The code will running successfully and the user will import in the database but there is a problem while reading a string from the csv file. I'm using ubuntu making a csv file using software LibreOffice Calc. The files seems like this. When I import this records then it will insert the record but I can't do any booking with this user because the software says the customer is not valid because of the "O'max". But when I give the manually entry to the software with same details then it will not create any error. Can anyone tell me what is the actual problem that there is problem while reading the name from csv file or any other issue?. The frontend is on the Angular.



FrontEnd :- Angular



BackEnd:- Golang



Database :- Mongodb










share|improve this question




















  • 1





    Post the relevant part of your code so that others can try to reproduce the problem.

    – Gregory Higley
    Nov 15 '18 at 4:56











  • @GregoryHigley There is nothing special in code there is no validation in the code for this but in database it will do different entry for csv data it enters O’max and for manually entered data it will enter the string like O'max

    – msd
    Nov 15 '18 at 5:04













  • @GregoryHigley Can you tell me why it make a difference of '

    – msd
    Nov 15 '18 at 5:16











  • Not without seeing the code and the input data. Computers are deterministic. So there must be a difference of some kind between the two scenarios.

    – Gregory Higley
    Nov 16 '18 at 12:35














-1












-1








-1








I'm testing my code of importing a user record in the database. The code will running successfully and the user will import in the database but there is a problem while reading a string from the csv file. I'm using ubuntu making a csv file using software LibreOffice Calc. The files seems like this. When I import this records then it will insert the record but I can't do any booking with this user because the software says the customer is not valid because of the "O'max". But when I give the manually entry to the software with same details then it will not create any error. Can anyone tell me what is the actual problem that there is problem while reading the name from csv file or any other issue?. The frontend is on the Angular.



FrontEnd :- Angular



BackEnd:- Golang



Database :- Mongodb










share|improve this question
















I'm testing my code of importing a user record in the database. The code will running successfully and the user will import in the database but there is a problem while reading a string from the csv file. I'm using ubuntu making a csv file using software LibreOffice Calc. The files seems like this. When I import this records then it will insert the record but I can't do any booking with this user because the software says the customer is not valid because of the "O'max". But when I give the manually entry to the software with same details then it will not create any error. Can anyone tell me what is the actual problem that there is problem while reading the name from csv file or any other issue?. The frontend is on the Angular.



FrontEnd :- Angular



BackEnd:- Golang



Database :- Mongodb







angular mongodb go






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 '18 at 4:55







msd

















asked Nov 15 '18 at 4:41









msdmsd

43




43








  • 1





    Post the relevant part of your code so that others can try to reproduce the problem.

    – Gregory Higley
    Nov 15 '18 at 4:56











  • @GregoryHigley There is nothing special in code there is no validation in the code for this but in database it will do different entry for csv data it enters O’max and for manually entered data it will enter the string like O'max

    – msd
    Nov 15 '18 at 5:04













  • @GregoryHigley Can you tell me why it make a difference of '

    – msd
    Nov 15 '18 at 5:16











  • Not without seeing the code and the input data. Computers are deterministic. So there must be a difference of some kind between the two scenarios.

    – Gregory Higley
    Nov 16 '18 at 12:35














  • 1





    Post the relevant part of your code so that others can try to reproduce the problem.

    – Gregory Higley
    Nov 15 '18 at 4:56











  • @GregoryHigley There is nothing special in code there is no validation in the code for this but in database it will do different entry for csv data it enters O’max and for manually entered data it will enter the string like O'max

    – msd
    Nov 15 '18 at 5:04













  • @GregoryHigley Can you tell me why it make a difference of '

    – msd
    Nov 15 '18 at 5:16











  • Not without seeing the code and the input data. Computers are deterministic. So there must be a difference of some kind between the two scenarios.

    – Gregory Higley
    Nov 16 '18 at 12:35








1




1





Post the relevant part of your code so that others can try to reproduce the problem.

– Gregory Higley
Nov 15 '18 at 4:56





Post the relevant part of your code so that others can try to reproduce the problem.

– Gregory Higley
Nov 15 '18 at 4:56













@GregoryHigley There is nothing special in code there is no validation in the code for this but in database it will do different entry for csv data it enters O’max and for manually entered data it will enter the string like O'max

– msd
Nov 15 '18 at 5:04







@GregoryHigley There is nothing special in code there is no validation in the code for this but in database it will do different entry for csv data it enters O’max and for manually entered data it will enter the string like O'max

– msd
Nov 15 '18 at 5:04















@GregoryHigley Can you tell me why it make a difference of '

– msd
Nov 15 '18 at 5:16





@GregoryHigley Can you tell me why it make a difference of '

– msd
Nov 15 '18 at 5:16













Not without seeing the code and the input data. Computers are deterministic. So there must be a difference of some kind between the two scenarios.

– Gregory Higley
Nov 16 '18 at 12:35





Not without seeing the code and the input data. Computers are deterministic. So there must be a difference of some kind between the two scenarios.

– Gregory Higley
Nov 16 '18 at 12:35












1 Answer
1






active

oldest

votes


















1














You may be unintentionally escaping the created SQL query unless I'm mistaken. Handle the character, or better yet rewrite your SQL query to be parameterized.



Without knowing what database you are trying to use it is hard to post material that may aid you in this situation.






share|improve this answer
























  • see the eit I mention what database I'm using

    – msd
    Nov 15 '18 at 4:56











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312539%2fwhy-there-is-difference-while-reading-the-omax-string-from-csv-file-using-gol%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You may be unintentionally escaping the created SQL query unless I'm mistaken. Handle the character, or better yet rewrite your SQL query to be parameterized.



Without knowing what database you are trying to use it is hard to post material that may aid you in this situation.






share|improve this answer
























  • see the eit I mention what database I'm using

    – msd
    Nov 15 '18 at 4:56
















1














You may be unintentionally escaping the created SQL query unless I'm mistaken. Handle the character, or better yet rewrite your SQL query to be parameterized.



Without knowing what database you are trying to use it is hard to post material that may aid you in this situation.






share|improve this answer
























  • see the eit I mention what database I'm using

    – msd
    Nov 15 '18 at 4:56














1












1








1







You may be unintentionally escaping the created SQL query unless I'm mistaken. Handle the character, or better yet rewrite your SQL query to be parameterized.



Without knowing what database you are trying to use it is hard to post material that may aid you in this situation.






share|improve this answer













You may be unintentionally escaping the created SQL query unless I'm mistaken. Handle the character, or better yet rewrite your SQL query to be parameterized.



Without knowing what database you are trying to use it is hard to post material that may aid you in this situation.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 15 '18 at 4:49









ElevennnElevennn

113




113













  • see the eit I mention what database I'm using

    – msd
    Nov 15 '18 at 4:56



















  • see the eit I mention what database I'm using

    – msd
    Nov 15 '18 at 4:56

















see the eit I mention what database I'm using

– msd
Nov 15 '18 at 4:56





see the eit I mention what database I'm using

– msd
Nov 15 '18 at 4:56




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53312539%2fwhy-there-is-difference-while-reading-the-omax-string-from-csv-file-using-gol%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Florida Star v. B. J. F.

Danny Elfman

Lugert, Oklahoma