Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

122
Views
string with very special characters causes problemes

I have a string

๐–†๐–‡๐–ˆ

and I want the get the second character from this string

// with a normal string the result is
var normalString = "abc"
normalString[1] // -> b
// but with this one the reslt is 
var weirdString = "๐–†๐–‡๐–ˆ"
weirdString[1] // -> ๏ฟฝ I get this "replacement charactere" instead of ๐–‡
about 4 years ago ยท Juan Pablo Isaza
1 answers
Answer question

0

1) You can use spread syntax here to spread string into an array

const weirdStringArr = [...weirdString];

2) Access the UNICODE symbol using index

weirdStringArr[1]

var weirdString = "๐–†๐–‡๐–ˆ";
const weirdStringArr = [...weirdString];
console.log(weirdStringArr[1]);

about 4 years ago ยท Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!