Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7076731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:20:02+00:00 2026-05-28T06:20:02+00:00

I have a data of a form: v = \xc5\x84 This is a byte

  • 0

I have a data of a form:
v = "\xc5\x84"

This is a byte representation of an utf-8 encoded character “ń”.

How can I print >>ń<< using variable v?

I’m using python 2.7.2

In original the variable v contained string:

v = "\\xc5\\x84" (double backslashes)

vs

v = "\xc5\x84" (single backslashes)

which is by itself valid utf-8 character.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:20:03+00:00Added an answer on May 28, 2026 at 6:20 am

    Edit In my machine the output depends on the shell/python used, as shown below.
    As commented by Klaus a major actor here would be the locale setting in your system.

    >>> v = "\xc5\x84"
    
    >>> print v   #in pycrust shell python 2.6
    Å„
    >>>
    
    >>> print (v) #in idle python 3.2
    Å
    >>> 
    

    the machine has the following settings:

    >>> import locale
    >>> locale.getlocale()
    ('es_ES', 'cp1252')
    

    Independently of this setting, you get your character with

    >>> print v.decode('utf-8')
    ń
    >>> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some data in this form (dictionary): Value0 Text1 Value1 Text2 Value2 Text3
I have a variable that contains an array from form data, seen below: $option1
I have the following form <form name=myForm id=myForm method=post enctype=multipart/form-data action=script.php> and this jQuery
I have this HTML: <form action='uploadhandle.php' method='POST' enctype=multipart/form-data> <input type='file' class='fileinput' id='photo1' name='photo1'> <input
I have data of this form: x y 1 0.19 2 0.26 3 0.40
I have a raw form-data that look like this: ------------V2ymHFg03ehbqgZCaKO6jy Content-Disposition: form-data; name=intro O
I have data of this form: Category Source Amount Dues FTW $100 Donations ODP
How can I reference a form by name using JQuery? I have 3 different
i have to send form data which have multiselect boxes to a servlet using
I have data in this form, Article ID Company A Company B Company C

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.