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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:26:37+00:00 2026-06-14T03:26:37+00:00

I have such code for importing to db: require ‘csv’ CSV.foreach(/#{Rails.public_path}/uploads_prices/acc.csv, {:encoding => ISO-8859-15:UTF-8,

  • 0

I have such code for importing to db:

require 'csv'
    CSV.foreach("/#{Rails.public_path}/uploads_prices/acc.csv", {:encoding => "ISO-8859-15:UTF-8", :col_sep => ";", :row_sep => :auto, :headers => :none}) do | row |
      @accum = Accumulator.new
      @accum.model = row[2]
      @accum.description = row[2]
      #@cross = OtherProductsCrossList.new
      logger.warn(row[1])
      logger.warn(row[2])


        if @accum.save
          if @accum.persisted?
            @accum.other_products_cross_lists.create(:cross_value => row[1], :distributor_id => 1, :product_type_id => 2)
          end
        end
    end   

My file looks like this:

Код № по каталогу  (артикул)    Наименование  товара    Ед. изм.    Цена опт.   Доп.    Остатки | Минск Класс   Группа  Бренд
96528   AH-36АЕТ    ASIAN HORSE 36з евр (тонк.кл.) 280A (187x127x227)                                                       шт      38,58           Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
96529   AH-36АRТ    ASIAN HORSE 36з рус (тонк.кл.) 280A (187x127x227)                                                       шт      38,58           Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
88634   AH-45АЕТ    ASIAN HORSE 45з евр 300A (238x129x227) (545158033)                                                      шт      46,14           Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
82978   AH-45АЕ ASIAN HORSE 45з евр 300A тонк.клемы  (238x129x227) (545157033)                                          шт      36,57       >8  Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
96531   AH-60АЕ ASIAN HORSE 60з евр 510A (232x173x225)                                                                  шт      48,76           Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
82979   AH-70АЕ ASIAN HORSE 70з евр 600A (261x175x220)                                                                  шт      56,92       3   Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
96530   AH-70АR ASIAN HORSE 70з рус 600A (261x175x220)                                                                  шт      56,92       >8  Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
82980   AH-95АЕ ASIAN HORSE 95з евр 760A (306x173x225)                                                                  шт      77,21       >8  Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
96532   AH-95АR ASIAN HORSE 95з рус 760A (306x173x225)                                                                  шт      77,21       >8  Аккумуляторы и электрооборудование                                                                      ASIAN HORSE до 100А                                                                                     АКБ ASIAN HORSE
25335   600 103 085 Бэрен polar 100з (600103) 850A (353x175x190)                                                            шт      107,42          Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN
102137  600 150 087 / L5 100    Бэрен polar 100з (600150) 870A (353x175x190)                                                            шт      94,7            Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN
25332   544 111 042 / L1B 44    Бэрен polar 44з (544111) 420A (207x175x175)                                                             шт      47,83       4   Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN
70160   544 150 039 Бэрен polar 44з (544150) 390A (175x175x190)                                                             шт      56,94           Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN
70165   550 122 054 Бэрен polar 50з (550122) 540A (242x175x175)                                                             шт      63,21           Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN
102134  554 150 052 / L1 54+    Бэрен polar 54з (554150) 520A (207x175x190)                                                             шт      55,92           Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN
107894  554 150 054 / L2B 54    Бэрен polar 54з (554150) 520A (242x175x175)                                                             шт      60,93           Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN
27574       Бэрен polar 55/59з (555112) 480A (242x175x190)                                                          шт      51,72           Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN
70161   555 114 051 Бэрен polar 55з (555114) 510A (207x175x190)                                                             шт      58,56           Аккумуляторы и электрооборудование                                                                      BAREN до 100 A                                                                                          АКБ BAREN

but for Asian horse i see in db Asian horse, but for Бэрен polar i see Áýðåí polar. How can i told rails that it must correctly import russian symbols?

Also file is here:
link

  • 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-14T03:26:38+00:00Added an answer on June 14, 2026 at 3:26 am

    Nothing helps… But i tried with many encoding in phpmyadmin, and set that is good for my question (cp1251bin)… don’t know my before it didn’t worked

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have such code (copy paste from wiki). Its multiplication of those big numbers
I have such code: $updateSQL = UPDATE `Rooms` R SET R.Revenue = {$s['Revenue']}, R.Ave_rent
I have such code: <h:inputText id=input value=#{bean.input}> <f:convertNumber /> <rich:ajaxValidator event=onblur /> </h:inputText> I
I have such code in my JSF template: <h:form> <table id=users cellspacing=0> <a4j:repeat var=person
i have such code var prj = _dataContext.Project.FirstOrDefault(p => p.isPopular == true); if (prj
I have such code: function allValid() { $('input').each(function(index) { if(something) { return false; }
I have such code: Prelude> let n = [1,2,3,4] Prelude> n [1,2,3,4] Prelude> 0:n
I'm trying to understand how php function usort works. I have such code: <?php
I have a such code for Lithuanian declension: <?php $word = namas; $string =
Let's say I have such PoC code snippet for working with canvas raw pixel

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.