Why can't notepad display new line characters within the string?
<p>I am getting perfect results in Word pad(new line after the text) but I am unable to get new line in notepad using the below code. And would like to get the same results which i am getting in the word pad.</p>

<pre><code> private void getIntentDetails() {

        intent = getIntent();

        if (intent.hasExtra("testName")) {
            testName = (String) intent.getExtras().get("testName");
            Log.e("testName ", "testName " + testName);
            appendLog("TestName : ");
            appendLog(testName);
            appendLog(",  ");
            //appendLog("\n");
        }

        if (intent.hasExtra("testDate")) {
            testDate = (String) intent.getExtras().get("testDate");
            Log.e("testDate ", "testDate " + testDate);
            appendLog("TestDate : ");
            appendLog(testDate);
            appendLog(",  ");
        }

        if (intent.hasExtra("testTime")) {
            testTime = (String) intent.getExtras().get("testTime");
            Log.e("testTime ", "testTime " + testTime);
            appendLog("TestTime : ");
            appendLog(testTime);
            appendLog(",  ");
        }

        if (intent.hasExtra("savedName")) {
            savedName = (String) intent.getExtras().get("savedName");
            Log.e("savedName ", "savedName " + savedName);
            appendLog("SavedName : ");
            appendLog(savedName);
            appendLog(",  ");
        }


        if (intent.hasExtra("sensitivity")) {
            sensitivity = (String) intent.getExtras().get("sensitivity");
            Log.e("sensitivity ", "sensitivity " + sensitivity);
            appendLog("Accelerometer Sensitivity : ");
            appendLog(sensitivity);
            appendLog(" ,  ");
        }

        if (intent.hasExtra("xvalues")) {
            xValues = (ArrayList&lt;Float&gt;) intent.getExtras().get("xvalues");
            Log.e("xValues ", "xValues " + xValues.size());
            for (int indexx = 0; indexx &lt; xValues.size(); indexx++) {
                xvalue = xValues.get(indexx).toString();
                if (indexx == 0) {
                    appendLog("X-Values : ");
                }
                appendLog(xvalue);
                appendLog(", ");

            }

        }
        Log.d("X-Values : ", ""+ xValues.size());

        if (intent.hasExtra("yvalues")) {
            yValues = (ArrayList&lt;Float&gt;) intent.getExtras().get("yvalues");
            Log.e("yValues ", "yValues " + yValues.size());
            for (int indexy = 0; indexy &lt; yValues.size(); indexy++) {
                yvalue = yValues.get(indexy).toString();
                if (indexy == 0) {
                    appendLog("Z-Values : ");
                }
                appendLog(yvalue);
                appendLog(", ");

            }

        }
        Log.e("Z-Values : ", ""+ yValues.size());

        if(intent.hasExtra("xpos")){
            xPos = (String[]) intent.getExtras().get("xpos");


        }
//      for(int m = 0; m&lt; xPos.length;m++){
//          Log.d("xPos", "  "+ xPos[m]);
//      }
        if(intent.hasExtra("xneg")){
        xNeg = (String[]) intent.getExtras().get("xneg");
        Log.e("xNeg ", "xNeg " + xNeg.length);

        }
//      for(int m = 0; m&lt; xNeg.length;m++){
//          Log.d("xNeg", "  "+ xNeg[m]);
//      }
        if(intent.hasExtra("ypos")){
            yPos = (String[]) intent.getExtras().get("ypos");
            Log.e("yPos ", "yPos " + yPos.length);

        }
//      for(int m = 0; m&lt; yPos.length;m++){
//          Log.d("yPos", "  "+ yPos[m]);
//      }
        if(intent.hasExtra("yneg")){
            yNeg = (String[]) intent.getExtras().get("yneg");
            Log.e("yNeg ", "yNeg " + yNeg.length);

        }
//      for(int m = 0; m&lt; yNeg.length;m++){
//          Log.d("yNeg", "  "+ yNeg[m]);
//      }

    }
</code></pre>

<hr>

<pre><code>    private void appendLog(String text) {

        File logFile = new File(fileLocation);
        if (!logFile.exists()) {
            try {
                Log.e("file was not created", "file  created");
                logFile.createNewFile();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        try {
            // BufferedWriter for performance, true to set append to file flag
            BufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true)/*,8192*/);
            //buf.newLine();
        //  System.getProperty("line.separator");
            buf.write(text);
            //System.getProperty("line.separator");
            //buf.append("\n");
            //buf.write("/\n");
            buf.newLine();

            buf.close();
        } catch (IOException e) {

            e.printStackTrace();
        }
    }
</code></pre>
