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 7615175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:35:01+00:00 2026-05-31T02:35:01+00:00

When I extract data from a MySQL database, some of the output have special

  • 0

When I extract data from a MySQL database, some of the output have special characters,
when opened in e.g. emacs it decodes to \240 and \346.

When shown in an UTF-8 terminal, the special characters is shown as �

So the used encoding seams to only use 1 byte per character.

I can e.g. see that \346 should be æ.

Question

Does Perl have a module that can encode these special characters to UTF-8?

  • 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-31T02:35:01+00:00Added an answer on May 31, 2026 at 2:35 am

    Use Encode::decode to decode your data from whatever encoding it’s in to Perl’s internal format.

    Then, when writing the data out to a file, set the 'utf8' layer to make the data be written in UTF-8.

    use Encode;
    
    my $data_from_database = ...;
    
    my $perl_data = decode('ISO-8859-1', $data_from_database);
    
    binmode STDOUT, ':utf8';
    
    print $perl_data;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to extract some product information from mysql database, then construct a SOAP
I need to extract data from my MySQL database into multiple text files. I
I'm working with mysql (5.1) ruby (1.8.7) connector to extract some data from a
I want to extract some data from the database without refreshing a page. What
I'm wanting to extract data from a mySQL database which shows the members with
I'm using PHP to extract data from a MySQL database. I am able to
I have been trying to extract data from a database and fill in a
I have written a few Python tools in the past to extract data from
I have a pgp-encrypted file that I need to extract data from at runtime.
Sometimes I need to quickly extract some arbitrary data from XML files to put

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.