logo elektroda
logo elektroda
X
logo elektroda

[Solved] Converting special characters - How to convert special characters into Polish le

Kresowianin 19872 13
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18763535
    Kresowianin
    Level 5  
    Posts: 6
    Rate: 8
    I am converting dbf database to excel. By the way, it turns Polish letters into special characters. How to convert them back to Polish letters in Excel? Only uppercase letters are used.
    How to convert special characters into Polish letters: ? = Ł, ?= Ę, ? = Ż, ? = Ą, ? = Ć, Ó = Ń, ? = Ó, ? = ź
    I am not a programmer, I use excel, word as an intermediate.
  • ADVERTISEMENT
  • #2 18763586
    Anonymous
    Level 1  
  • #3 18763619
    ta_tar
    Level 41  
    Posts: 6438
    Help: 693
    Rate: 2027
    You can as follows (if you already know all the characters). You run "Find and replace" there you enter the first character, eg ?, and in the second field Ł. With find> replace you play in the exchange.
    I can see that I checked for too long - I have already been warned.
  • ADVERTISEMENT
  • #4 18763908
    Kresowianin
    Level 5  
    Posts: 6
    Rate: 8
    ta_tar wrote:
    You can as follows (if you already know all the characters). You run "Find and replace" there you enter the first character, eg ?, and in the second field Ł. With find> replace you play in the exchange.
    I can see that I checked for too long - I have already been warned.

    I know that, but it takes too long. I was thinking of some faster way - with one click ...
  • ADVERTISEMENT
  • #5 18763966
    wojtek1234321
    Level 36  
    Posts: 3553
    Help: 306
    Rate: 1118
    Kresowianin wrote:
    with one click
    In Word and Excel there is also an option "Replace all" (I mean it was, mine is "old" because Office 2007, maybe now "new" is not). Well, however, such a substitution can be applied to individual characters, so you would have to enter each character separately and then "Replace all" and so in turn for all characters ...

    Converting special characters - How to convert special characters into Polish le


    Converting special characters - How to convert special characters into Polish le
  • #6 18764264
    Kresowianin
    Level 5  
    Posts: 6
    Rate: 8
    [/ quote] In Word and Excel there is also an option "Replace all" (I mean it was, mine is "old" because Office 2007, maybe now "new" is not there). Well, however, such a substitution can be applied to individual characters, so you would have to enter each character separately and then "Replace all" and so in turn for all characters ...
    That's not the point either :) This is how you know, so I do. But my point is to be able to enter "swap all pairs" once and then give "swap all". I don't know if any macro? But I don't accept special characters ...
  • #7 18764359
    chojinka
    Level 29  
    Posts: 1827
    Help: 47
    Rate: 283
    You have an active Scandinavian keyboard, in the lower right year you click on the keyboard or badge like pl, etc., add a Polish keyboard and remove others, check the language in the main settings. There it can be assigned some other, you add Polish when it is not there and change it to the main one. you delete others. Then you enter exela languages, check what you have there, add Polish and create others ...
  • Helpful post
    #8 18764373
    PRL
    Level 41  
    Posts: 6869
    Help: 953
    Rate: 888
    Quote:
    How to convert special characters into Polish letters

    Write a function in VBA for example.

    Code: VBScript
    Log in, to see the code
    Helpful post? Buy me a coffee.
  • #9 18764401
    Kresowianin
    Level 5  
    Posts: 6
    Rate: 8
    PRL - you are closest to solving the topic. But there is one problem. At least for me - it doesn't accept the signs: ?, ?, ?, ?, Ó, Ó, ?, ?, ?. She puts a "?" Sign everywhere.

    Added after 6 [minutes]:

    chojinka wrote:
    You have an active Scandinavian keyboard, in the lower right year you click on the keyboard or badge like pl, etc., add a Polish keyboard and remove others, check the language in the main settings. There it can be assigned some other, you add Polish when it is not there and change it to the main one. you delete others. Then you enter exela languages, check what you have there, add Polish and create others ...


    Polish keyboard, W10 system.
  • #10 18764437
    ta_tar
    Level 41  
    Posts: 6438
    Help: 693
    Rate: 2027
    Kresowianin wrote:
    does not accept the following characters: ?, ?, ?, ?, Ó, Ó, ?, ?, ?. She puts a "?" Sign everywhere.
    How do you enter these characters? Use "insert symbol" and select "Latin-1 (complement)" in the subset. Your stamps are there.
  • #11 18764449
    adamas_nt
    VIP Meritorious for electroda.pl
    Posts: 5320
    Help: 1508
    Rate: 658
    The VBA editor will not accept any characters other than those in the table according to the locale.
    Check through AscW what code they have and proper basis.
    Converting special characters - How to convert special characters into Polish le
  • ADVERTISEMENT
  • #12 18764468
    Kresowianin
    Level 5  
    Posts: 6
    Rate: 8
    ta_tar wrote:
    Kresowianin wrote:
    does not accept the following characters: ?, ?, ?, ?, Ó, Ó, ?, ?, ?. She puts a "?" Sign everywhere.
    How do you enter these characters? Use "insert symbol" and select "Latin-1 (complement)" in the subset. Your stamps are there.


    But where?
    Attachments:
    • Zrzut.docx (163.75 KB) You must be logged in to download this attachment.
  • #14 18766751
    Kresowianin
    Level 5  
    Posts: 6
    Rate: 8
    PRL - thanks for your help. After compiling all the information, something like this came out that might help others if they had this problem:

    Code: VBScript
    Log in, to see the code

    Added after 2 [minutes]:

    The People's Republic of Poland led us to a solution.

Topic summary

✨ The discussion revolves around converting special characters in a DBF database to Polish letters when exporting to Excel. Users suggest utilizing the "Find and Replace" function in Excel and Word, which allows for character substitution, although it can be time-consuming if done manually for each character. Some users inquire about a more efficient method, such as using macros or VBA functions to automate the process. A VBA function example is provided, which replaces specific special characters with their Polish equivalents. Additionally, users discuss the importance of having the correct keyboard settings to input Polish characters effectively.
Generated by the language model.

FAQ

TL;DR: Fix DBF→Excel Polish letters fast using an 8‑character VBA map; “Finished Feature:” delivers the working function for one‑click runs. [Elektroda, PRL, post #18764783]

Why it matters: This FAQ helps Excel/Word users quickly restore Polish diacritics after DBF imports without manual retyping.

Quick Facts

How do I convert special characters back to Polish letters in Excel with one click?

Use a button‑driven macro that reads mapping pairs from a helper sheet and replaces them across a set range. How‑To:
  1. Create sheet “slow”; put source chars in column A and replacements in column B.
  2. Paste the macro, set Obszar = "a2:az500", and add a button calling CommandButton1_Click.
  3. Click the button to run all replacements; you’ll see “GOTOWE” when done. This scales to many pairs without repeated manual steps. [Elektroda, Kresowianin, post #18766751]

What’s the quickest non‑coding fix?

Use Find and Replace with Replace All. Enter the wrong character in “Find,” the correct Polish letter in “Replace,” then click Replace All. Repeat for each needed letter. It runs across the whole sheet or document quickly. This is fast for a few characters, but tedious for many pairs. [Elektroda, wojtek1234321, post #18763966]

Can VBA do this automatically for known character codes?

Yes. The Ogonki() function maps eight specific codepoints (e.g., 216, 191, 162…) to ŁĘŻĄĆŃÓŹ while rebuilding the string. Insert the function in a module, then call it on cells containing corrupted text. This approach removes repeated manual replacements and is reliable once codes are set. That’s an 8‑mapping conversion in one pass. [Elektroda, PRL, post #18764783]

Why do I see question marks in the VBA editor or after paste?

The VBA editor respects your system locale. Characters outside that table can display as “?” when typed or pasted. Use AscW on the source text to read actual codepoints, then map those codes in your function or replacement table. Edge case: if it still shows “?”, you must reference by code rather than the glyph. [Elektroda, adamas_nt, post #18764449]

I can’t type Polish letters—how do I insert them for mapping?

Insert them from the ribbon: Insert → Symbol, then choose the Latin‑1 (Supplement) subset. Pick the needed letters and paste them into your mapping table or Replace dialog. This avoids keyboard layout issues and ensures exact characters are used for replacements. [Elektroda, ta_tar, post #18764437]

How do I process all rows in a column without selecting ranges manually?

Use a VBA procedure that finds the last used row and loops from row 2 to the end, applying a conversion function to each cell. “Write a function in VBA for example.” Then call it on the target column to transform values in place. This automates full‑column cleanup. [Elektroda, PRL, post #18764373]

Will switching my keyboard or language settings fix it?

It helps with input, not corrupted data. Add the Polish keyboard in Windows, set it as default, and remove others if needed. That ensures you can type diacritics correctly. However, imported DBF text still needs replacement or a macro to restore letters. [Elektroda, chojinka, post #18764359]

How do I build my own mapping table for different corrupted symbols?

Use a two‑column mapping sheet. Place each corrupted character in column A and its Polish counterpart in column B. A macro loops through these pairs and runs Replace across your target range. This design scales to any number of entries and is easy to maintain. [Elektroda, Kresowianin, post #18766751]

Does Replace All work in Word too before pasting back to Excel?

Yes. Word and Excel both include Replace All. You can fix text in Word using Replace All for each character, then paste corrected text back into Excel. This is convenient if you already have the data in Word while preparing your sheet. [Elektroda, wojtek1234321, post #18763966]

What range should I target—can I limit it to A2:AZ500?

Yes. The example macro targets Obszar = "a2:az500" so it only modifies that block. Adjust the address to your data location. If you have more rows, extend the ending row number. If fewer, shorten it. This keeps replacements scoped to the intended cells. [Elektroda, Kresowianin, post #18766751]

My dataset uses only uppercase—do I need lowercase mappings?

No. You can map only uppercase letters. The shared Ogonki() example targets uppercase ŁĘŻĄĆŃÓŹ. If you later encounter lowercase, extend the mapping accordingly using the same pattern. This keeps your conversion minimal and focused. [Elektroda, PRL, post #18764783]

How can I detect which original symbols need mapping from my DBF import?

Test a sample cell and run AscW on each unexpected character to capture its codepoint. Add those codes and intended replacements to your function or mapping table. This diagnostic step ensures you map the exact corrupted bytes correctly. [Elektroda, adamas_nt, post #18764449]

I already use a Polish keyboard on Windows 10 but still see wrong letters—what now?

Keyboard settings confirm input, but they don’t repair imported text. The thread’s working solution applied a VBA replacement approach rather than changing keyboard settings. Use the mapping macro or the Ogonki() function to restore letters. [Elektroda, Kresowianin, post #18764401]
Generated by the language model.
ADVERTISEMENT