Getting Error Message While Saving Emojis With Text Data
up vote
2
down vote
favorite
I am trying to save emojis along with text data to postgressql database with version PostgreSQL 9.4.15
and encoding UTF8
in my Spring MVC Web application
. I had used database Default collation in utf8.
I am able to save the emojis along with text data in the database, but while retrieving the rows using my dao method, it is showing an error like below.
Invalid character data was found. This is most likely caused by
stored data containing characters that are invalid for the character
set the database was created in. The most common example of this is
storing 8bit data in an SQL_ASCII database.
My friend end is xamarin forms PCL project, Is there any way to fix this issue from front end itself or any solution from the backend?
Thanks in advance
java postgresql spring-mvc xamarin.forms
add a comment |
up vote
2
down vote
favorite
I am trying to save emojis along with text data to postgressql database with version PostgreSQL 9.4.15
and encoding UTF8
in my Spring MVC Web application
. I had used database Default collation in utf8.
I am able to save the emojis along with text data in the database, but while retrieving the rows using my dao method, it is showing an error like below.
Invalid character data was found. This is most likely caused by
stored data containing characters that are invalid for the character
set the database was created in. The most common example of this is
storing 8bit data in an SQL_ASCII database.
My friend end is xamarin forms PCL project, Is there any way to fix this issue from front end itself or any solution from the backend?
Thanks in advance
java postgresql spring-mvc xamarin.forms
use a different character set
– Stultuske
Nov 20 at 12:48
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am trying to save emojis along with text data to postgressql database with version PostgreSQL 9.4.15
and encoding UTF8
in my Spring MVC Web application
. I had used database Default collation in utf8.
I am able to save the emojis along with text data in the database, but while retrieving the rows using my dao method, it is showing an error like below.
Invalid character data was found. This is most likely caused by
stored data containing characters that are invalid for the character
set the database was created in. The most common example of this is
storing 8bit data in an SQL_ASCII database.
My friend end is xamarin forms PCL project, Is there any way to fix this issue from front end itself or any solution from the backend?
Thanks in advance
java postgresql spring-mvc xamarin.forms
I am trying to save emojis along with text data to postgressql database with version PostgreSQL 9.4.15
and encoding UTF8
in my Spring MVC Web application
. I had used database Default collation in utf8.
I am able to save the emojis along with text data in the database, but while retrieving the rows using my dao method, it is showing an error like below.
Invalid character data was found. This is most likely caused by
stored data containing characters that are invalid for the character
set the database was created in. The most common example of this is
storing 8bit data in an SQL_ASCII database.
My friend end is xamarin forms PCL project, Is there any way to fix this issue from front end itself or any solution from the backend?
Thanks in advance
java postgresql spring-mvc xamarin.forms
java postgresql spring-mvc xamarin.forms
edited Dec 3 at 10:57
asked Nov 20 at 12:46
K.Sumith
6818
6818
use a different character set
– Stultuske
Nov 20 at 12:48
add a comment |
use a different character set
– Stultuske
Nov 20 at 12:48
use a different character set
– Stultuske
Nov 20 at 12:48
use a different character set
– Stultuske
Nov 20 at 12:48
add a comment |
3 Answers
3
active
oldest
votes
up vote
1
down vote
accepted
It is very easy to solve this issue from the front end. Since your front end is xamarin forms you need to encode the contents before sending it into the server and decode the content when you retrieve.
System.Net.WebUtility.UrlEncode(*string*); // Encode
System.Net.WebUtility.UrlDecode(*string*); // Decode
add a comment |
up vote
2
down vote
Another option to try: Client needs to encode message in base 64 before sending to server and decode back to base 64 before returning the data back to client. This should make the emojis work on the client applications.
add a comment |
up vote
1
down vote
You may have to refer the following article The ultimate guide to Emojis to get some insight in to how this can be handled.
add a comment |
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',
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53393318%2fgetting-error-message-while-saving-emojis-with-text-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
It is very easy to solve this issue from the front end. Since your front end is xamarin forms you need to encode the contents before sending it into the server and decode the content when you retrieve.
System.Net.WebUtility.UrlEncode(*string*); // Encode
System.Net.WebUtility.UrlDecode(*string*); // Decode
add a comment |
up vote
1
down vote
accepted
It is very easy to solve this issue from the front end. Since your front end is xamarin forms you need to encode the contents before sending it into the server and decode the content when you retrieve.
System.Net.WebUtility.UrlEncode(*string*); // Encode
System.Net.WebUtility.UrlDecode(*string*); // Decode
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
It is very easy to solve this issue from the front end. Since your front end is xamarin forms you need to encode the contents before sending it into the server and decode the content when you retrieve.
System.Net.WebUtility.UrlEncode(*string*); // Encode
System.Net.WebUtility.UrlDecode(*string*); // Decode
It is very easy to solve this issue from the front end. Since your front end is xamarin forms you need to encode the contents before sending it into the server and decode the content when you retrieve.
System.Net.WebUtility.UrlEncode(*string*); // Encode
System.Net.WebUtility.UrlDecode(*string*); // Decode
answered Dec 3 at 11:05
Sreejith Sree
363112
363112
add a comment |
add a comment |
up vote
2
down vote
Another option to try: Client needs to encode message in base 64 before sending to server and decode back to base 64 before returning the data back to client. This should make the emojis work on the client applications.
add a comment |
up vote
2
down vote
Another option to try: Client needs to encode message in base 64 before sending to server and decode back to base 64 before returning the data back to client. This should make the emojis work on the client applications.
add a comment |
up vote
2
down vote
up vote
2
down vote
Another option to try: Client needs to encode message in base 64 before sending to server and decode back to base 64 before returning the data back to client. This should make the emojis work on the client applications.
Another option to try: Client needs to encode message in base 64 before sending to server and decode back to base 64 before returning the data back to client. This should make the emojis work on the client applications.
answered Nov 29 at 20:32
Vimal Mathew
47538
47538
add a comment |
add a comment |
up vote
1
down vote
You may have to refer the following article The ultimate guide to Emojis to get some insight in to how this can be handled.
add a comment |
up vote
1
down vote
You may have to refer the following article The ultimate guide to Emojis to get some insight in to how this can be handled.
add a comment |
up vote
1
down vote
up vote
1
down vote
You may have to refer the following article The ultimate guide to Emojis to get some insight in to how this can be handled.
You may have to refer the following article The ultimate guide to Emojis to get some insight in to how this can be handled.
answered Nov 23 at 21:22
Vimal Mathew
47538
47538
add a comment |
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53393318%2fgetting-error-message-while-saving-emojis-with-text-data%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
use a different character set
– Stultuske
Nov 20 at 12:48