Convert Special Quoations to Normal QuoationsConvert non-ASCII characters (umlauts, accents…) to their closest ASCII equivalent (slug creation)How to convert decimal to hex in JavaScript?Convert JavaScript String to be all lower case?How can I convert a string to boolean in JavaScript?Convert a string to an integer in JavaScript?Convert form data to JavaScript object with jQueryConvert JS object to JSON stringPHP from quotation mark outputHTML Unicode Issue: How to display special charactersPowershell - ASCII encoding is changing special characters to question marksReplacing unknown special characters from string using JavaScript

What typically incentivizes a professor to change jobs to a lower ranking university?

How old can references or sources in a thesis be?

Why doesn't Newton's third law mean a person bounces back to where they started when they hit the ground?

How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

How can I automatically replace [[ and ]] with the [LeftDoubleBracket] and [RightDoubleBracket] operators?

What would the Romans have called "sorcery"?

The use of multiple foreign keys on same column in SQL Server

What defenses are there against being summoned by the Gate spell?

Why are only specific transaction types accepted into the mempool?

Why is the design of haulage companies so “special”?

Copycat chess is back

Copenhagen passport control - US citizen

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

What is the command to reset a PC without deleting any files

Is it possible to make sharp wind that can cut stuff from afar?

N.B. ligature in Latex

How does one intimidate enemies without having the capacity for violence?

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Question about Goedel's incompleteness Proof

What exactly is the parasitic white layer that forms after iron parts are treated with ammonia?

Why did the Germans forbid the possession of pet pigeons in Rostov-on-Don in 1941?

How is this relation reflexive?

Can I interfere when another PC is about to be attacked?



Convert Special Quoations to Normal Quoations


Convert non-ASCII characters (umlauts, accents…) to their closest ASCII equivalent (slug creation)How to convert decimal to hex in JavaScript?Convert JavaScript String to be all lower case?How can I convert a string to boolean in JavaScript?Convert a string to an integer in JavaScript?Convert form data to JavaScript object with jQueryConvert JS object to JSON stringPHP from quotation mark outputHTML Unicode Issue: How to display special charactersPowershell - ASCII encoding is changing special characters to question marksReplacing unknown special characters from string using JavaScript






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















So i saw this thread here which talks about converting non-ASCII characters to their closest ASCII equivalent. The given solution is:



var str = "Rånades på Skyttis i Ö-vik";
var combining = /[u0300-u036F]/g;

console.log(str.normalize('NFKD').replace(combining, ''));


Now my issue is similar but not the same. I am looking at replacing special characters like Left Double Quotation Mark which is hex or entity “. The problem is that i can't use the hex code, html entity or any form of encoding. I need to replace special characters like this with their closest standard UTF-8 Character like a normal Double Quotation Mark. The reason being is that the final product is going into an email subject line and no encoding can be present there on some clients, so i'm looking for a JS solution.



It can't be a straight mapping either because it might not be a quotation mark, it could be any kind of symbol. Like an mdash which needs to become a normal dash.










share|improve this question






















  • why do you assume there is an appropriate ascii character? Without a mapping, I think this is going to be essentially impossible.

    – Scott Sauyet
    Mar 22 at 0:39











  • @Scott Sauyet If i do a mapping there is always the potential to miss something. I assumed, maybe there is a js library that already has a mapping out there which covers 99% of characters.

    – JordanGS
    Mar 22 at 0:42











  • Unicode is large. What would be your candidate ASCII character for :pile-of-poo:?

    – Scott Sauyet
    Mar 22 at 0:49











  • @Scott Sauyet no emoji's, just stuff that's usually used in essays, stories, news articles, etc.

    – JordanGS
    Mar 22 at 3:54











  • But the point is that as far as I know there is no definitive list of that "stuff". I think you probably need to start collecting a list of the ones that matter to you. Almost certainly others have done so, and you might be able to find such a list online. But I've never seen one.

    – Scott Sauyet
    Mar 22 at 16:14

















0















So i saw this thread here which talks about converting non-ASCII characters to their closest ASCII equivalent. The given solution is:



var str = "Rånades på Skyttis i Ö-vik";
var combining = /[u0300-u036F]/g;

console.log(str.normalize('NFKD').replace(combining, ''));


Now my issue is similar but not the same. I am looking at replacing special characters like Left Double Quotation Mark which is hex or entity “. The problem is that i can't use the hex code, html entity or any form of encoding. I need to replace special characters like this with their closest standard UTF-8 Character like a normal Double Quotation Mark. The reason being is that the final product is going into an email subject line and no encoding can be present there on some clients, so i'm looking for a JS solution.



It can't be a straight mapping either because it might not be a quotation mark, it could be any kind of symbol. Like an mdash which needs to become a normal dash.










share|improve this question






















  • why do you assume there is an appropriate ascii character? Without a mapping, I think this is going to be essentially impossible.

    – Scott Sauyet
    Mar 22 at 0:39











  • @Scott Sauyet If i do a mapping there is always the potential to miss something. I assumed, maybe there is a js library that already has a mapping out there which covers 99% of characters.

    – JordanGS
    Mar 22 at 0:42











  • Unicode is large. What would be your candidate ASCII character for :pile-of-poo:?

    – Scott Sauyet
    Mar 22 at 0:49











  • @Scott Sauyet no emoji's, just stuff that's usually used in essays, stories, news articles, etc.

    – JordanGS
    Mar 22 at 3:54











  • But the point is that as far as I know there is no definitive list of that "stuff". I think you probably need to start collecting a list of the ones that matter to you. Almost certainly others have done so, and you might be able to find such a list online. But I've never seen one.

    – Scott Sauyet
    Mar 22 at 16:14













0












0








0








So i saw this thread here which talks about converting non-ASCII characters to their closest ASCII equivalent. The given solution is:



var str = "Rånades på Skyttis i Ö-vik";
var combining = /[u0300-u036F]/g;

console.log(str.normalize('NFKD').replace(combining, ''));


Now my issue is similar but not the same. I am looking at replacing special characters like Left Double Quotation Mark which is hex or entity “. The problem is that i can't use the hex code, html entity or any form of encoding. I need to replace special characters like this with their closest standard UTF-8 Character like a normal Double Quotation Mark. The reason being is that the final product is going into an email subject line and no encoding can be present there on some clients, so i'm looking for a JS solution.



It can't be a straight mapping either because it might not be a quotation mark, it could be any kind of symbol. Like an mdash which needs to become a normal dash.










share|improve this question














So i saw this thread here which talks about converting non-ASCII characters to their closest ASCII equivalent. The given solution is:



var str = "Rånades på Skyttis i Ö-vik";
var combining = /[u0300-u036F]/g;

console.log(str.normalize('NFKD').replace(combining, ''));


Now my issue is similar but not the same. I am looking at replacing special characters like Left Double Quotation Mark which is hex or entity “. The problem is that i can't use the hex code, html entity or any form of encoding. I need to replace special characters like this with their closest standard UTF-8 Character like a normal Double Quotation Mark. The reason being is that the final product is going into an email subject line and no encoding can be present there on some clients, so i'm looking for a JS solution.



It can't be a straight mapping either because it might not be a quotation mark, it could be any kind of symbol. Like an mdash which needs to become a normal dash.







javascript character-encoding ascii converters






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 at 0:31









JordanGSJordanGS

8632919




8632919












  • why do you assume there is an appropriate ascii character? Without a mapping, I think this is going to be essentially impossible.

    – Scott Sauyet
    Mar 22 at 0:39











  • @Scott Sauyet If i do a mapping there is always the potential to miss something. I assumed, maybe there is a js library that already has a mapping out there which covers 99% of characters.

    – JordanGS
    Mar 22 at 0:42











  • Unicode is large. What would be your candidate ASCII character for :pile-of-poo:?

    – Scott Sauyet
    Mar 22 at 0:49











  • @Scott Sauyet no emoji's, just stuff that's usually used in essays, stories, news articles, etc.

    – JordanGS
    Mar 22 at 3:54











  • But the point is that as far as I know there is no definitive list of that "stuff". I think you probably need to start collecting a list of the ones that matter to you. Almost certainly others have done so, and you might be able to find such a list online. But I've never seen one.

    – Scott Sauyet
    Mar 22 at 16:14

















  • why do you assume there is an appropriate ascii character? Without a mapping, I think this is going to be essentially impossible.

    – Scott Sauyet
    Mar 22 at 0:39











  • @Scott Sauyet If i do a mapping there is always the potential to miss something. I assumed, maybe there is a js library that already has a mapping out there which covers 99% of characters.

    – JordanGS
    Mar 22 at 0:42











  • Unicode is large. What would be your candidate ASCII character for :pile-of-poo:?

    – Scott Sauyet
    Mar 22 at 0:49











  • @Scott Sauyet no emoji's, just stuff that's usually used in essays, stories, news articles, etc.

    – JordanGS
    Mar 22 at 3:54











  • But the point is that as far as I know there is no definitive list of that "stuff". I think you probably need to start collecting a list of the ones that matter to you. Almost certainly others have done so, and you might be able to find such a list online. But I've never seen one.

    – Scott Sauyet
    Mar 22 at 16:14
















why do you assume there is an appropriate ascii character? Without a mapping, I think this is going to be essentially impossible.

– Scott Sauyet
Mar 22 at 0:39





why do you assume there is an appropriate ascii character? Without a mapping, I think this is going to be essentially impossible.

– Scott Sauyet
Mar 22 at 0:39













@Scott Sauyet If i do a mapping there is always the potential to miss something. I assumed, maybe there is a js library that already has a mapping out there which covers 99% of characters.

– JordanGS
Mar 22 at 0:42





@Scott Sauyet If i do a mapping there is always the potential to miss something. I assumed, maybe there is a js library that already has a mapping out there which covers 99% of characters.

– JordanGS
Mar 22 at 0:42













Unicode is large. What would be your candidate ASCII character for :pile-of-poo:?

– Scott Sauyet
Mar 22 at 0:49





Unicode is large. What would be your candidate ASCII character for :pile-of-poo:?

– Scott Sauyet
Mar 22 at 0:49













@Scott Sauyet no emoji's, just stuff that's usually used in essays, stories, news articles, etc.

– JordanGS
Mar 22 at 3:54





@Scott Sauyet no emoji's, just stuff that's usually used in essays, stories, news articles, etc.

– JordanGS
Mar 22 at 3:54













But the point is that as far as I know there is no definitive list of that "stuff". I think you probably need to start collecting a list of the ones that matter to you. Almost certainly others have done so, and you might be able to find such a list online. But I've never seen one.

– Scott Sauyet
Mar 22 at 16:14





But the point is that as far as I know there is no definitive list of that "stuff". I think you probably need to start collecting a list of the ones that matter to you. Almost certainly others have done so, and you might be able to find such a list online. But I've never seen one.

– Scott Sauyet
Mar 22 at 16:14












0






active

oldest

votes












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%2f55291190%2fconvert-special-quoations-to-normal-quoations%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















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%2f55291190%2fconvert-special-quoations-to-normal-quoations%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

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현