Author Topic: How to find the illegal chars when you failed to post(Database Error)  (Read 3292 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Some times, I got failed to post a message in our forum

You will get the error message like:

Quote
Database Error
Please try again. If you come back to this error screen, report the error to an administrator.

But you don't know which chars cause this. Here is a way to find it.

For example, you can copy a text from this page GB 2312 - Wikipedia, which got such error. You can put your text in Notepad++, and see below image: 2022-11-05-convert-ANSI.png

And in the menu->Encoding, try to click the ANSI menu item, you got the result like below image: 2022-11-05-result.png

Now, you see which chars cause this error.

 ;)


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Wkerry

  • Multiple posting newcomer
  • *
  • Posts: 42
Re: How to find the illegal chars when you failed to post(Database Error)
« Reply #1 on: November 05, 2022, 03:59:09 am »
I use the search facility as described on the following page as sometimes using the ANSI/UTF-8 options do not show some characters:

https://stackoverflow.com/questions/20889996/how-do-i-remove-all-non-ascii-characters-with-regex-and-notepad

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to find the illegal chars when you failed to post(Database Error)
« Reply #2 on: November 05, 2022, 04:11:29 am »
I use the search facility as described on the following page as sometimes using the ANSI/UTF-8 options do not show some characters:

https://stackoverflow.com/questions/20889996/how-do-i-remove-all-non-ascii-characters-with-regex-and-notepad

Thanks.

Well, I think not all non-ANSI chars are not allowed in our forum. If I remember correctly, only a limited chars are not allowed. At least it can show Chinese chars.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.