Try this:
$title = get_post_field('post_title', $post_id, 'raw');
However I’d get to the bottom of what encoding reddit code would prefer. Echoing raw stuff is poor idea for security.
Related Posts:
- Is ‘# -*- coding: utf-8 -*-‘ also a comment in Python?
- What is the difference between UTF-8 and Unicode?
- Byte and char conversion in Java
- What is “=C2=A0” in MIME encoded, quoted-printable text?
- Strange characters – despite everything being UTF-8
- One for the gurus: upgrade to 3.x messed up only filenames with accented chars
- Word press replacing unicode characters with “?”s
- How to set charset for wp_remote_post request?
- Apostrophes showing up as ΓÇÖ after converting from Windows to Linux
- WordPress content shows this character ​​
- Symbols such as £ end up being  in the database
- Fix encoding ’ [closed]
- Getting Non-printable characters were found while entering Euro Symbol
- How to deal with apostrophes
- Question mark on special chars
- Encoding Issue while using French in WordPress
- Get ?? for unicode characters
- WordPress theme character encoding issue
- character encoding problem in custom template
- restored old database now some characters have changed?
- WordPress plugin problem with encoding
- Post removes any text from post that’s following special characters
- UTF-8 Characters in URL – IE problem
- WordPress Dashboard Characters Messed Up
- How to make sure the letters ‘pez’ do not convert to a fish symbol? [closed]
- Problem some Persian texts show in ISO-8859-5
- WP Links from Facebook and Google Ads shows invalid characters
- HTML encoding issues – “” character showing up instead of ” “
- What character encoding is >?
- How to replace � in a string
- hashlib.md5() TypeError: Unicode-objects must be encoded before hashing
- Converting string to byte array in C#
- Does “\d” in regex mean a digit?
- What is base 64 encoding used for?
- Python – Reading and writing csv files with utf-8 encoding
- Where does this come from: -*- coding: utf-8 -*-
- how to convert negative hexadecimal to decimal
- python encoding utf-8
- The origin on why ‘%20’ is used as a space in URLs
- I have a string with “\u00a0”, and I need to replace it with “” str_replace fails
- “Unmappable character for encoding UTF-8” error
- Using unicode character u201c
- URL Encoding Issue %3D instead of (=)
- Python decoding Unicode is not supported
- C# Encoding a text string with line breaks
- Random Question Mark Icons In WordPress Text
- If a hacker changed the blog_charset to UTF-7 does that make WordPress vulnerable to further attacks?
- Encode text string being appended as query to URL [closed]
- Truncating custom fields
- How to stop WordPress using utf8mb4_unicode_520_ci collation?
- Syntax error, unexpected ‘class’ (T_CLASS) on line 1 after upgrade to php 5.6.4
- Character encoding issue after changing servers
- Add whitespace between Chinese and other letters
- How can I stop TinyMCE from converting my HTML entities to characters?
- WordPress Database Charset/Collate
- Why WP encodes UNICODE (UTF8) containing urls? Any drawbacks of UNICODE url?
- do_settings_sections() doesn’t escape quotes
- Allowing non-latin characters in registration
- JSON not valid after json_encode posts
- Non-Latin Characters in permalinks
- How to increase the character limit for post name of 200?
- Faulty restore of the database, encoding issue
- Remove “Category Archives: title” at the top of a category page [duplicate]
- How to encode post content as JSON?
- How to write Hebrew characters?
- What is wp_check_invalid_utf8?
- WordPress load-scripts.php encoding issue
- Text cut off on save
- Strange characters on wordpress site – Not UTF8 Issue
- Custom DB_COLLATE (collation) value not working on fresh install?
- What is WordPress file encoding?
- How to diagnose and keep in check encoding issues?
- add_rewrite_rule not working for language specific characters
- Query string becomes encoded when a static page is used as homepage
- Text cut off after the character 𪇆 in TinyMCE
- Site Rss not seen by browser
- WordPress problem with htmlentities
- Emojis getting converted to “?”
- Unexpected = (equal sign) characters in wp mail
- Website dumps encoded result
- How do I change database charset when using `wpdb`
- Why does wp_redirect strip out %0A (url encoded new line character) and how do I make it stop?
- urlencode query string in gravity forms confirmation redirect
- TinyMCE as comment editor – encoding issues
- HTML Entities displaying improperly as malformed escaped code
- Post Content, Special Characters and Filters
- How to get my post title to work with an apostrophe (‘s)?
- Non latin post slug truncate
- Is sanitize_title_with_dashes formatting function too liberal (in terms of accepted characters)?
- Editing URL character replacement
- Return encoded Page Title outside of a loop
- How to properly encode url with parameters for redirect_to
- Avoid glitchy characters – my own version of the problem
- Adding inline JavaScript encoding issue
- copying text from ms word to wordpress post appears weird [closed]
- images not showing after transfer
- Unicode characters displaying as ? after import using WP Clone
- How to use Japanese characters for a single page
- esc_js() breaks unicode sequences by removing the slash ‘\’ character
- Post editor loads empty