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

261
Views
I want to make a text converter to unicode converter. The code was going pretty well but I am stuck at changing as '\' is shown invalid
else if (arr2[i] == ']') {
  mainarr.push('े')
} else if (arr2[i] == '}') {
  mainarr.push('ै')
} else if (arr2[i] == '\') {
  mainarr.push('्')
}

I want to make a text converter to Unicode converter. The code was going pretty well but I am stuck at changing as '' is shown invalid. Any way I can type '/'?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Backslash is often interpreted as an "indication of literal next" - meaning that the next character should NOT be interpreted. In the case above, I would guess that the compiler (and your IDE) is thinking that you meant to say that the single quote is literal.

To fix, make it a double backslash (aka, a literal backslash):

} else if (arr2[i] == '\\') { 
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!