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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:44:57+00:00 2026-05-30T09:44:57+00:00

I have the following string that I would like to split on the \xA7

  • 0

I have the following string that I would like to split on the \xA7 character.

\xFF$New Server\xA77\xA750

The problem being is that I can’t figure out how to tell Ruby to split it correctly on the \xA7 marker.

This is the error I get:

>> "\xFF$New Server\xA77\xA750".split("\xA7")
ArgumentError: invalid byte sequence in UTF-8
from (irb):26:in `split'
from (irb):26
from /Users/wedtm/.rbenv/versions/1.9.2-p290/bin/irb:12:in `<main>'
  • 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-30T09:44:58+00:00Added an answer on May 30, 2026 at 9:44 am

    When forcing the encoding to BINARY you can work around that issue, though not sure if it’s the correct solution or breaks other things…

    input = "\xFF$New Server\xA77\xA750".force_encoding('BINARY')
    split = "\xA7".force_encoding('BINARY')
    input.split(split) # => ["\xFF$New Server", "7", "50"]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following string: I would surely like to go to school. Now,
I have the following string that would require me to parse it via Regex
I have the following string and I would like to remove <bpt *>*</bpt> and
I have a string that represents a non indented XML that I would like
I have the following string ListId={1CC88B01-E60F-45D1-8B3C-28852574156D}&amp;ID={0}&amp;ContentTypeID=0x01003D458D19EF31D845B3A7727B0F2F8FC8 I would like to use it as such
I have the following String[] temp; which returns red blue green I would like
I have the following string: 2010-04-08T12:46:43+00:00 I want to convert that to: 8th April
I have the following C# which simply replaces parts of the input string that
I have the following connection string: Data Source=localhost\\SQLEXPRESS; , it complains that '' is
I have the following code that sets a cookie: string locale = ((DropDownList)this.LoginUser.FindControl(locale)).SelectedValue; HttpCookie

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.