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

  • Home
  • SEARCH
  • 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 7826855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:36:16+00:00 2026-06-02T09:36:16+00:00

Maybe you can help with a Yaml encoding I have. We have an application

  • 0

Maybe you can help with a Yaml encoding I have.

We have an application that stores some settings serialized in a database as a Yaml string, for example:

---
quantity_units: Stunden,Tage, Monate, Pauschal, Jahre, GB, MB, Stück, Seite, SMS
categories: Shirts
number_schema: P-[Y4]-[CY3]

We are in a process of moving from Ruby 1.8.7 to Ruby 1.9.3, and the Yaml parsing library has changed between the versions, leaving us with decoded strings like this from Stück to Stück.

I only want to know how could properly convert these strings into unicode, and I’ll take care of the rest.

I don’t know which encoding was using in 1.8.7 Yaml parser.

  • 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-06-02T09:36:17+00:00Added an answer on June 2, 2026 at 9:36 am

    This looks like utf8 read as iso-8895-1, and interpreted as utf-8 by
    the ruby adapter. You might want to check your current locale and the
    locale of the database server. Also see what happens if you access the
    data directly via console, and check the encoding there as well. It
    looks like utf-8 on the database, but gets interpreted as iso-8859-1
    somewhere in between.

    If nothing helps, there’s a snippet to pass your data through (and
    write it back).

     "Stück".encode('iso-8859-1').force_encoding('utf-8') # I've no idea what I'm doing.
     # => "Stück"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with preg_match_all that maybe you can help. I have a
maybe you can help me get this right. I have a class that is
i have problem with has_many_polymorphs, maybe you can help me. I have some models
I have a little dilemma that maybe you can help me sort out. I've
I have a question that has me stumped, maybe you can help. I have
I have a question related with JPopupMenu that maybe someone can help me. As
I have faced a curious condition and maybe you can help me understand that.
I'm working on asp.net (vb, maybe that can change something) I have a project
Maybe someone can help me out. I have created a simple web user control,
A have a question, maybe someone can help me. I am trying to make

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.