I have written a program in Python, using version 3.3.3. This program is just a simple weight loss tracking program that uses a pictograph for visual representation of whatever number the user has input. The characters used in the pictograph are all unicode (□▪▫∙). I have used the open() function as follows:  open('Pictograph.txt', mode = 'a', encoding = 'utf8')   Prior to using open(), I was using tkinter's askopenfile() which would allow me to let the user choose which file they'd want to save to, but would not allow me to set the encoding to UTF-8. I finally stumbled upon the encoding option of open(), which works well, but only in the Python shell. (I was having problems writing those characters to a standard .txt file before this, encoding = 'utf8' made the difference for that problem, but did not help anything in the command line.)  Now, I have a 'help' option that enables the user to see a legend of the pictograph, and in so display cp1252 text, as well as the four Unicode characters listed above.    I just captured this image, but prior to that I felt it had to do with text encoding in the command line. Is there any way to allow my program to set the command line to where it can read those characters and not crash?  This is what is supposed to print (as seen in the shell):    Any insight would be greatly appreciated.    Okay, so this is a duplicate. That's it? I tried looking for an answer for over an hour. I didn't find anything that would solve my problem. I would like not to have to spend another hour trying to find the page I am supposedly duplicating.
When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016).
How do I get breading to stick to pre-cooked chicken for pan frying? Suppose that $f(x)$ is continuous on $(0, \infty)$ such that for all $x > 0$,$f(x^2) = f(x)$. Prove that $f$ is a constant function. Suppose that $f(x)$ is continuous on $(0, +\infty)$ such that for all $x &gt; 0$,$f(x^2) = f(x)$. Prove that $f$ is a constant function. My attempt is to show that for any point $a \neq b$ , we have $f(a)=f(b)$. But I have no idea on how to get this. Anyone can help? How to solve 'I found no database files--while read file something.aux' Hi I am trying to include references into my paper but it keeps showing the following when I compile. I am using texstudio. Message: I'm skipping whatever remains of this command The style file: plain.bst I found no database files---while reading file term paper.aux Warning--I didn't find a database entry for "Astrov"  My code is like this:   \documentclass[letter,scriptaddress,twocolumn, prl,showkeys]{revtex4}  \usepackage{amssymb, amsmath, amstext, amscd, verbatim, mathtools, graphicx, float, caption, subcaption} \usepackage[utf8]{inputenc} \usepackage{natbib} \begin{document} This is my reference\cite[1]{Astrov}. \bibliography{term paper} \bibliographystyle{plain} \end{document}   They are all in the same directory. I am really panicing about this at the moment and apologize if similar questions have been asked before. Thanks in advance for your help! I am trying to create a flowchart with Tikz. Since it is a long one, it spans three pages. So after creating a node to stop, I am continuing to the next page using \newpage command. Unfortunately some elements in page 1 are connected to page 2, 3 and vice versa. So when I try to create the arrow connection, it is not possible since the \newpage command comes in between. I am sharing the code with you for info. Could  anyone help me to improve the flowchart so that I could direct the arrows among multiple pages. My sample code is below:  \begin{tikzpicture} \node 1 \node 2 ........ \draw[arrow] (node1)--(node2) \draw[arrow] (node2)--(node3) ---- \end tikzpicture} \newpage \begin{tikzpicture} \node 1 \node 2 ........ \draw[arrow] (node1)--(node2) \draw[arrow] (node2)--(node3) ---- \end tikzpicture} \newpage  \begin{tikzpicture} \node 1 \node 2 ........ \draw[arrow] (node1)--(node2) \draw[arrow] (node2)--(node3) ---- \end tikzpicture} How to disable creation of desktop workspaces on macbook?   Somehow they get created when I don't need them. [OS: Mojave] Do scimitars and rapiers count as swords for the magic items in the 5E DMG? Are rapiers and scimitars considered swords for magic items like:   Dancing Sword Defender Dragon Slayer Flame Tongue Frost Brand Giant Slayer Holy Avenger Luck Blade Nine Lives Stealer Sword of Life Stealing Sword of Sharpness (scimitar) Sword of Vengeance Sword of Wounding Vorpal Sword (scimitar)   Or are only shortswords (not Sword of Sharpness or Vorpal Sword), longswords and greatswords swords for these items and therefore available? alias to take a parameter and exit after execution minimal polynomial of powers of a matrix I am wondering, given the minimal polynomial of $A$, what can we say about the minimal polynomial of $A^n$?  I know that if we were looking at the roots of the characteristic polynomial ie eigenvalues then the roots of the characteristic polynomial of $A^n$ would be $nth$ powers of the eigenvalues so again these are roots of the minimal polynomial also. Looking for a short story about a robot evolving to have supernatural powers I'm looking for a short story from about 50 years ago about a robot who escapes after being slated to be melted down and discovers while in hiding that it has evolved to have some supernatural powers. Degrees of freedom for standard deviation of sample would someone please explain why the degrees of freedom for a random sample is n-1 instead of n ?   I'm looking for an explanation that is intuitive and easily understood by a high school student. How to use proxy for Transmission? How to put a brace on the right, not left, to group cases? How can I get a brace on the right, not the left, to group cases, using cases? (I know actual cases look better with the brace on the left, but the items I need to group are not literally cases. They are a set of steps in an algorithm which I want to consider as an item.)  The following puts the brace on the left. All I need to do is to flip it to the right.  \begin{align} \begin{cases} a&amp;=bbb\\ c&amp;=ddddddd\\ e&amp;=ffffffffff \end{cases} \end{align}   Thanks for any help with this! Use mathematical induction to prove that 6(n+2) + 7(2n+1) is divisible by 43 for n >= 1.  So start with n = 1:  6(1+2) + 7(2(1)+1) = 63 + 73 = 559 -> 559/43 = 13. So n=1 is divisible  Let P(k): 6(k+2)+7(2k+1) , where k>=1  Show that P(k+1): 6((k+1)+2) + 7(2(k+1)+1) is true  = 6(k+1+2) + 7(2k+2+1)  = 6(k+3) + 7(2k+3)  I'm unsure where to go from here, I've tried several directions after this but have got nowhere. I don't know how to get the 43 or 559 out the front.  Any help would be great This is sort of a follow-up to a feature request that resulted in obscuring spam / offensive content from 10K-visible answers:   Suggest the same to be done for questions. As of now, spam questions (, ) preserve their titles and content. Suggest to revise the titles to something like     This question was marked as spam or offensive and is therefore not shown   And the text to something like:     This question was marked as spam or offensive and is therefore not shown - you can see the revision history for details".   Where "the revision history" links to the question revision history.    For those interested, here is a link to screen shots of how spam shines through my flagging summary page and is displayed to me when I click the link to one of deleted questions: .  For the sake of precision, flagger having less than 10K rep would see only upper screen shot - the one that lists question titles ("Call giRℒs blah blah &lt;phone number&gt;") - in their  page. I would like to use pgfplots to create a figure where I plot curves that have a recursive formula. I tried a very simple case that uses the declare function command to see whether this is possible, and I can't compile (TeX capacity exceeded). Is it even possible to do this?  \documentclass{standalone}  \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}[   declare function={test(\p)=ifthenelse(\p&gt;1, test(\p-1), 0.5);}, ]     \begin{axis}[]     % use TeX as calculator:     \addplot [mark=none] {x};     \addplot [mark=none] {test(0)};     \end{axis} \end{tikzpicture}  \end{document} When I write C++ code for a class using templates and split the code between a source (CPP) file and a header (H) file, I get a whole lot of "unresolved external symbol" errors when it comes to linking the final executible, despite the object file being correctly built and included in the linking.  What's happening here, and how can I fix it? Word for someone who acts like an expert but who has very little knowledge? What is a word to describe an individual who acts like an expert in a subject area, constantly stating facts and correcting people, but who actually has very little knowledge on the subject? Software implementations of random forest classifiers have a number of parameters to allow users to fine-tune the algorithm's behavior, including the number of trees $T$ in the forest. Is this a parameter that needs to be tuned, in the same way as $m$, the number of features to try at each split (what Leo Breiman calls mtry)? Adding Edge Loops Around Airplane Window I would like to add an edge loop around each one of these windows and are not 100% sure on the best way to do it even after watching some videos.  If someone could point me in the right direction that would be great. Thanks. Writing my first script so I'm sure this is a basic question, but can someone please explain to me why I can:  cd ~ cd bin cd ~/bin cd 'bin'   But not  cd '~' cd '~/bin'   I need to cd to a directory path with a space in one of the directory names, so I need the quotes (it's Windows Program Files under wine). I can get around it with two cd commands, but why can't I put ~ in quotes?  If I type cd '~' (or cd "~") I get:  bash: cd: ~: No such file or directory